sandy

text editor
git clone git://git.suckless.org/sandy
Log | Files | Refs | README | LICENSE

commit ad325aadda7f942510273a3bbbac4b07d97c1075
parent bd4f1dd402431fa5b52cf4fcf0a984e89e638e9d
Author: Dimitris Zervas <dzervas@dzervas.gr>
Date:   Sun, 13 Jul 2014 20:21:25 +0300

Merge remote-tracking branch 'bitbucket/master'

Diffstat:
config.def.h | 4+++-
sandy.c | 8++++----
2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -1,4 +1,6 @@ /* A simplified way to customize */ +#define USE_TERM_STATUS 1 +#define BOTTOM_TITLE 0 #define HILIGHT_CURRENT 1 #define HILIGHT_SYNTAX 1 #define SHOW_NONPRINT 0 @@ -292,7 +294,7 @@ static const Command cmds[] = { /* REMEMBER: if(arg == 0) arg.v=regex_match */ static const Syntax syntaxes[] = { #if HILIGHT_SYNTAX -{"c", "\\.(c(pp|xx)?|h(pp|xx)?|cc)$", { +{"c", "\\.([ch](pp|xx)?|cc)$", { /* HiRed */ "$^", /* HiGreen */ B"(for|if|while|do|else|case|default|switch|try|throw|catch|operator|new|delete)"B, /* LoGreen */ B"(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline|((s?size)|((u_?)?int(8|16|32|64|ptr)))_t|class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)"B, diff --git a/sandy.c b/sandy.c @@ -495,7 +495,7 @@ f_spawn(const Arg *arg) { void f_suspend(const Arg *arg) { - wclear(textwin); + endwin(); signal (SIGCONT, i_sigcont); raise(SIGSTOP); } @@ -1394,15 +1394,15 @@ i_termwininit(void) { noecho(); nl(); if(textwin) delwin(textwin); - if(tigetflag("hs") > 0) { + if(USE_TERM_STATUS && tigetflag("hs") > 0) { tsl_str=tigetstr("tsl"); fsl_str=tigetstr("fsl"); textwin=newwin(lines,cols,0,0); } else { if(titlewin) delwin(titlewin); - titlewin=newwin(1,cols,0,0); + titlewin=newwin(1,cols,BOTTOM_TITLE?lines-1:0,0); wattron(titlewin,A_REVERSE); - textwin=newwin(lines-1,cols,1,0); + textwin=newwin(lines-1,cols,BOTTOM_TITLE?0:1,0); } idlok(textwin, TRUE); keypad(textwin, TRUE);