sandy

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

commit 05efa94d5e8d60704d8f323e5f0616a36a34ceb2
parent 1a62e17e1d53dbe5048b31b8d8c5d9de556b7e58
Author: Rafael Garcia <rafael.garcia.gallego@gmail.com>
Date:   Fri, 27 May 2011 12:59:52 +0200

Pancake's comments (2)
Diffstat:
config.def.h | 12++++--------
sandy.c | 2--
2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -1,5 +1,5 @@ /* Things unlikely to be changed, yet still in the config.h file */ -static bool isutf8 = TRUE; /* Default, reverse with -u */ +static const bool isutf8 = TRUE; static const char fifobase[] = "/tmp/sandyfifo."; /* TAB and Space character aspect on screen */ @@ -70,10 +70,6 @@ static const Key stdkeys[] = { /* You probably know these as TAB, Enter and Return */ { CONTROL('I'), { t_sel, t_rw, 0, 0 }, f_pipelines, { .v = "sed 's/^/\\t/'" } }, { CONTROL('I'), { t_rw, 0, 0, 0 }, f_insert, { .v = "\t" } }, -{ CONTROL('J'), { t_rw, 0, 0, 0 }, f_insert, { .v = "\n" } }, -{ CONTROL('J'), { 0, 0, 0, 0 }, f_move, { .m = m_nextline } }, -{ CONTROL('M'), { t_rw, 0, 0, 0 }, f_insert, { .v = "\n" } }, -{ CONTROL('M'), { 0, 0, 0, 0 }, f_move, { .m = m_nextline } }, /* Cursor movement, also when selecting */ { CONTROL('A'), { 0, 0, 0, 0 }, f_move, { .m = m_bol } }, @@ -179,7 +175,7 @@ static Syntax syntaxes[] = { /* HiMag */ "\\<(goto|continue|break|return)\\>", /* LoMag */ "^[[:space:]]*#[[:space:]]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)", /* HiBlue */ "(\\(|\\)|\\{|\\}|\\[|\\])", - /* LoRed */ "(\\<[A-Z_][0-9A-Z_]+\\>|\"(\\.|[^\"])*\")", + /* LoRed */ "(\\<[A-Z_][0-9A-Z_]+\\>|\"(\\\\.|[^\"])*\")", /* LoBlue */ "(//.*|/\\*([^*]|\\*[^/])*\\*/|/\\*([^*]|\\*[^/])*$|^([^/]|/[^*])*\\*/)", } }, @@ -188,7 +184,7 @@ static Syntax syntaxes[] = { /* HiGreen */ "^[0-9A-Z_]+\\(\\)", /* LoGreen */ "\\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\\>", /* HiMag */ "", - /* LoMag */ "\"(\\.|[^\"])*\"", + /* LoMag */ "\"(\\\\.|[^\"])*\"", /* HiBlue */ "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)", /* LoRed */ "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?", /* LoBlue */ "#.*$", @@ -223,7 +219,7 @@ static Syntax syntaxes[] = { /* HiMag */ "\\<(try|catch|throw|finally|continue|break|return)\\>", /* LoMag */ "\\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\\>", /* HiBlue */ "(\\(|\\)|\\{|\\}|\\[|\\])", - /* LoRed */ "\"(\\.|[^\"])*\"", + /* LoRed */ "\"(\\\\.|[^\"])*\"", /* LoBlue */ "(//.*|/\\*([^*]|\\*[^/])*\\*/|/\\*([^*]|\\*[^/])*$|^([^/]|/[^*])*\\*/)", } }, }; diff --git a/sandy.c b/sandy.c @@ -1596,8 +1596,6 @@ main(int argc, char **argv){ for(i = 1; i < argc && argv[i][0] == '-' && argv[i][1] != '\0'; i++) { if(!strcmp(argv[i], "-r")) { statusflags|=S_Readonly; - } else if(!strcmp(argv[i], "-u")) { - isutf8=!isutf8; } else if(!strcmp(argv[i], "-t")) { if(++i < argc) { tabstop=atoi(argv[i]);