mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
vim-patch:8.2.3825: various comments could be improved
Problem: Various comments could be improved.
Solution: Improve the comments.
52797bae17
This commit is contained in:
parent
56fa08b458
commit
f59f81c32e
@ -1894,7 +1894,7 @@ static int handle_mapping(int *keylenp, bool *timedout, int *mapdepth)
|
||||
// buffer right here. Otherwise, use the mapping (loop around).
|
||||
if (mp == NULL) {
|
||||
*keylenp = keylen;
|
||||
return map_result_get; // got character, break for loop
|
||||
return map_result_get; // get character from typeahead
|
||||
} else {
|
||||
keylen = mp_match_len;
|
||||
}
|
||||
@ -2166,7 +2166,7 @@ static int vgetorpeek(bool advance)
|
||||
KeyNoremap = typebuf.tb_noremap[typebuf.tb_off];
|
||||
del_typebuf(1, 0);
|
||||
}
|
||||
break;
|
||||
break; // got character, break the for loop
|
||||
}
|
||||
|
||||
// not enough characters, get more
|
||||
|
@ -1609,7 +1609,8 @@ void show_utf8(void)
|
||||
msg((char *)IObuff);
|
||||
}
|
||||
|
||||
/// Return offset from "p" to the first byte of the character it points into.
|
||||
/// Return offset from "p" to the start of a character, including composing characters.
|
||||
/// "base" must be the start of the string, which must be NUL terminated.
|
||||
/// If "p" points to the NUL at the end of the string return 0.
|
||||
/// Returns 0 when already at the first byte of a character.
|
||||
int utf_head_off(const char_u *base, const char_u *p)
|
||||
@ -1850,10 +1851,9 @@ int mb_off_next(char_u *base, char_u *p)
|
||||
return i;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the offset from "p" to the last byte of the character it points
|
||||
* into. Can start anywhere in a stream of bytes.
|
||||
*/
|
||||
/// Return the offset from "p" to the last byte of the character it points
|
||||
/// into. Can start anywhere in a stream of bytes.
|
||||
/// Composing characters are not included.
|
||||
int mb_tail_off(char_u *base, char_u *p)
|
||||
{
|
||||
int i;
|
||||
|
@ -18,22 +18,20 @@
|
||||
#include "nvim/garray.h"
|
||||
#include "nvim/os/input.h"
|
||||
|
||||
/*
|
||||
* Logging of NFA engine.
|
||||
*
|
||||
* The NFA engine can write four log files:
|
||||
* - Error log: Contains NFA engine's fatal errors.
|
||||
* - Dump log: Contains compiled NFA state machine's information.
|
||||
* - Run log: Contains information of matching procedure.
|
||||
* - Debug log: Contains detailed information of matching procedure. Can be
|
||||
* disabled by undefining NFA_REGEXP_DEBUG_LOG.
|
||||
* The first one can also be used without debug mode.
|
||||
* The last three are enabled when compiled as debug mode and individually
|
||||
* disabled by commenting them out.
|
||||
* The log files can get quite big!
|
||||
* Do disable all of this when compiling Vim for debugging, undefine REGEXP_DEBUG in
|
||||
* regexp.c
|
||||
*/
|
||||
// Logging of NFA engine.
|
||||
//
|
||||
// The NFA engine can write four log files:
|
||||
// - Error log: Contains NFA engine's fatal errors.
|
||||
// - Dump log: Contains compiled NFA state machine's information.
|
||||
// - Run log: Contains information of matching procedure.
|
||||
// - Debug log: Contains detailed information of matching procedure. Can be
|
||||
// disabled by undefining NFA_REGEXP_DEBUG_LOG.
|
||||
// The first one can also be used without debug mode.
|
||||
// The last three are enabled when compiled as debug mode and individually
|
||||
// disabled by commenting them out.
|
||||
// The log files can get quite big!
|
||||
// To disable all of this when compiling Vim for debugging, undefine REGEXP_DEBUG in
|
||||
// regexp.c
|
||||
#ifdef REGEXP_DEBUG
|
||||
# define NFA_REGEXP_ERROR_LOG "nfa_regexp_error.log"
|
||||
# define NFA_REGEXP_DUMP_LOG "nfa_regexp_dump.log"
|
||||
|
@ -1294,6 +1294,7 @@ func Test_edit_forbidden()
|
||||
call assert_fails(':Sandbox', 'E48:')
|
||||
delcom Sandbox
|
||||
call assert_equal(['a'], getline(1,'$'))
|
||||
|
||||
" 2) edit with textlock set
|
||||
fu! DoIt()
|
||||
call feedkeys("i\<del>\<esc>", 'tnix')
|
||||
@ -1313,6 +1314,7 @@ func Test_edit_forbidden()
|
||||
catch /^Vim\%((\a\+)\)\=:E117/ " catch E117: unknown function
|
||||
endtry
|
||||
au! InsertCharPre
|
||||
|
||||
" 3) edit when completion is shown
|
||||
fun! Complete(findstart, base)
|
||||
if a:findstart
|
||||
@ -1330,6 +1332,7 @@ func Test_edit_forbidden()
|
||||
endtry
|
||||
delfu Complete
|
||||
set completefunc=
|
||||
|
||||
if has("rightleft") && exists("+fkmap")
|
||||
" 4) 'R' when 'fkmap' and 'revins' is set.
|
||||
set revins fkmap
|
||||
|
Loading…
Reference in New Issue
Block a user