aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c43
1 files changed, 31 insertions, 12 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index d505b40935..5c2efd326a 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -3919,7 +3919,8 @@ static buf_T *ins_compl_next_buf(buf_T *buf, int flag)
/// Get the user-defined completion function name for completion 'type'
-static char_u *get_complete_funcname(int type) {
+static char_u *get_complete_funcname(int type)
+{
switch (type) {
case CTRL_X_FUNCTION:
return curbuf->b_p_cfu;
@@ -6564,7 +6565,7 @@ static void spell_back_to_badword(void)
int stop_arrow(void)
{
if (arrow_used) {
- Insstart = curwin->w_cursor; //new insertion starts here
+ Insstart = curwin->w_cursor; // new insertion starts here
if (Insstart.col > Insstart_orig.col && !ins_need_undo) {
// Don't update the original insert position when moved to the
// right, except when nothing was inserted yet.
@@ -7630,16 +7631,34 @@ int hkmap(int c)
KAFsofit, hKAF, LAMED, MEMsofit, MEM, NUNsofit, NUN, SAMEH, AIN,
PEIsofit, PEI, ZADIsofit, ZADI, KOF, RESH, hSHIN, TAV,
};
- static char_u map[26] =
- { (char_u)hALEF /*a*/, (char_u)BET /*b*/, (char_u)hKAF /*c*/,
- (char_u)DALET /*d*/, (char_u)-1 /*e*/, (char_u)PEIsofit /*f*/,
- (char_u)GIMEL /*g*/, (char_u)HEI /*h*/, (char_u)IUD /*i*/,
- (char_u)HET /*j*/, (char_u)KOF /*k*/, (char_u)LAMED /*l*/,
- (char_u)MEM /*m*/, (char_u)NUN /*n*/, (char_u)SAMEH /*o*/,
- (char_u)PEI /*p*/, (char_u)-1 /*q*/, (char_u)RESH /*r*/,
- (char_u)ZAIN /*s*/, (char_u)TAV /*t*/, (char_u)TET /*u*/,
- (char_u)VAV /*v*/, (char_u)hSHIN /*w*/, (char_u)-1 /*x*/,
- (char_u)AIN /*y*/, (char_u)ZADI /*z*/ };
+ static char_u map[26] = {
+ (char_u)hALEF, // a
+ (char_u)BET, // b
+ (char_u)hKAF, // c
+ (char_u)DALET, // d
+ (char_u)-1, // e
+ (char_u)PEIsofit, // f
+ (char_u)GIMEL, // g
+ (char_u)HEI, // h
+ (char_u)IUD, // i
+ (char_u)HET, // j
+ (char_u)KOF, // k
+ (char_u)LAMED, // l
+ (char_u)MEM, // m
+ (char_u)NUN, // n
+ (char_u)SAMEH, // o
+ (char_u)PEI, // p
+ (char_u)-1, // q
+ (char_u)RESH, // r
+ (char_u)ZAIN, // s
+ (char_u)TAV, // t
+ (char_u)TET, // u
+ (char_u)VAV, // v
+ (char_u)hSHIN, // w
+ (char_u)-1, // x
+ (char_u)AIN, // y
+ (char_u)ZADI, // z
+ };
if (c == 'N' || c == 'M' || c == 'P' || c == 'C' || c == 'Z') {
return (int)(map[CharOrd(c)] - 1 + p_aleph);