diff options
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | src/conf.c | 1 | ||||
-rwxr-xr-x | src/doc | 11 | ||||
-rwxr-xr-x | src/gram.y | 8 | ||||
-rw-r--r-- | src/input.c | 2 |
5 files changed, 22 insertions, 2 deletions
@@ -5,6 +5,8 @@ Changes Improved yank and undo alloc'ing. Malloc as much we need from start in batches and avoid small mallocs. Disable mouse in mode other than NORMAL_MODE UNDO of :fsum is handled by let. +:fsum added to command mode commands. was missing. +Added mapping_timeout configuration value with a default value of 1500ms (used to be a fixed value of 800ms). Pending @@ -92,6 +92,7 @@ const char default_config[] = #else "default_paste_from_clipboard_cmd=\n" #endif + "mapping_timeout=1500\n" "tm_gmtoff=0\n"; @@ -1291,13 +1291,20 @@ Commands for handling cell content: 'tm_gmtoff' [default -10800 seconds] set gmtoffset used for converting datetimes to localtime. + 'mapping_timeout' [default 1500 milli seconds] + this is used when some user input collides with the start of a mapping. + sc-im will wait 'mapping_timeout' for user to complete a mapping. If + passed that time no mapping was reached, that input would be passed to + the buffer. + + 'ignorecase' [default off] set this to ignore case in searches done with '/' command. 'autobackup' [default 0 (no autobackup)] set this to a number in seconds 'n', to backup current file every 'n' seconds. - AUTOBACKUP must be set during Sc-im build for this feature to be + AUTOBACKUP must be set during sc-im build for this feature to be available. If you set this to 0 but AUTOBACKUP was set during build, it still will check for existance of backups before loading a file. @@ -1973,5 +1980,7 @@ Commands for handling cell content: NEWLINE_ACTION = {NUMBER} TM_GMTOFF TM_GMTOFF = {num} + MAPPING_TIMEOUT + MAPPING_TIMEOUT = {num} vim:tw=78:sw=4:ts=4:et:ft=help:norl: @@ -264,6 +264,7 @@ token S_YANKCOL %token K_IGNORECASE %token K_NOIGNORECASE %token K_TM_GMTOFF +%token K_MAPPING_TIMEOUT %token K_NEWLINE_ACTION %token K_SHOW_CURSOR %token K_NOSHOW_CURSOR @@ -1202,6 +1203,13 @@ setitem : | K_NEWLINE_ACTION '=' NUMBER { if ($3 == 0) parse_str(user_conf_d, "newline_action=0", TRUE); } + | K_MAPPING_TIMEOUT { parse_str(user_conf_d, "mapping_timeout=1500", TRUE); } + | K_MAPPING_TIMEOUT '=' num { + char * s = scxmalloc((unsigned) BUFFERSIZE); + sprintf(s, "mapping_timeout=%d", (int) $3); + parse_str(user_conf_d, s, TRUE); + scxfree(s); + } | K_TM_GMTOFF { parse_str(user_conf_d, "tm_gmtoff=-10800", TRUE); } | K_TM_GMTOFF '=' num { char * s = scxmalloc((unsigned) BUFFERSIZE); diff --git a/src/input.c b/src/input.c index 7959e80..d7407a9 100644 --- a/src/input.c +++ b/src/input.c @@ -104,7 +104,7 @@ void handle_input(struct block * buffer) { */ while ( ( ! has_cmd(buffer, msec) && msec <= CMDTIMEOUT) || - ( could_be_mapping(buffer) && msec_init < 800) + ( could_be_mapping(buffer) && msec_init < get_conf_int("mapping_timeout")) ) { // if command pending, refresh 'ef' only. Multiplier and cmd pending |