mirror of
https://https.git.savannah.gnu.org/git/nano.git
synced 2026-01-26 16:09:15 +00:00
rcfile: accept also {}} in a string bind, for symmetry with {{}
This commit is contained in:
parent
121dd596d9
commit
1ee74172c2
@ -352,11 +352,14 @@ int get_code_from_plantation(void)
|
||||
if (!closing)
|
||||
return MISSING_BRACE;
|
||||
|
||||
if (plants_pointer[1] == '{' && plants_pointer[2] == '}') {
|
||||
/* Handle the {{} sequence, and for symmetry accept {}} too. */
|
||||
if (plants_pointer[1] == '{' || plants_pointer[1] == '}') {
|
||||
if (plants_pointer[2] != '}')
|
||||
return MISSING_BRACE;
|
||||
plants_pointer += 3;
|
||||
if (*plants_pointer != '\0')
|
||||
put_back(MORE_PLANTS);
|
||||
return '{';
|
||||
return *(plants_pointer - 2);
|
||||
}
|
||||
|
||||
free(commandname);
|
||||
|
||||
@ -33,7 +33,7 @@ color crimson "\{(left|right|up|down|home|end|(scroll|page)(up|down)|(top|bottom
|
||||
color crimson "\{(tab|enter|delete|backspace|verbatim|refresh|suspend|casesens|regexp|backwards|older|newer|(dos|mac)format)\}"
|
||||
color crimson "\{(append|prepend|backup|flip(goto|replace|execute|pipe|convert|newbuffer)|browser|gotodir|(first|last)(file|line))\}"
|
||||
color crimson "\{(nohelp|constantshow|softwrap|linenumbers|whitespacedisplay|nosyntax|zero)\}"
|
||||
color crimson "\{(smarthome|autoindent|cutfromcursor|breaklonglines|tabstospaces|mouse|\{)\}"
|
||||
color crimson "\{(smarthome|autoindent|cutfromcursor|breaklonglines|tabstospaces|mouse|\{|\})\}"
|
||||
|
||||
# Commands
|
||||
color green "^[[:blank:]]*((un)?(bind|set)|include|syntax|header|magic|comment|formatter|linter|tabgives|extendsyntax)\>"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user