summaryrefslogtreecommitdiff
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-01-29 17:59:12 +0100
committerBram Moolenaar <Bram@vim.org>2017-01-29 17:59:12 +0100
commitddf662a1c86ef0b4bd0c55c5f0aa192ebd6d9a5e (patch)
tree70e917e0c60dffd51b2a037c039a8fd5d3bfa3b5 /src/edit.c
parent24c2e48ef8b8b9053fa18039e6f6118337f908f8 (diff)
downloadvim-ddf662a1c86ef0b4bd0c55c5f0aa192ebd6d9a5e.zip
patch 8.0.0262: Farsi support is barely tested
Problem: Farsi support is barely tested. Solution: Add more tests for Farsi. Clean up the code.
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/edit.c b/src/edit.c
index 47932c916..1164e2032 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -6166,6 +6166,9 @@ insertchar(
&& (!has_mbyte || MB_BYTE2LEN_CHECK(c) == 1)
#endif
&& i < INPUT_BUFLEN
+# ifdef FEAT_FKMAP
+ && !(p_fkmap && KeyTyped) /* Farsi mode mapping moves cursor */
+# endif
&& (textwidth == 0
|| (virtcol += byte2cells(buf[i - 1])) < (colnr_T)textwidth)
&& !(!no_abbr && !vim_iswordc(c) && vim_iswordc(buf[i - 1])))
@@ -6174,10 +6177,6 @@ insertchar(
c = vgetc();
if (p_hkmap && KeyTyped)
c = hkmap(c); /* Hebrew mode mapping */
-# ifdef FEAT_FKMAP
- if (p_fkmap && KeyTyped)
- c = fkmap(c); /* Farsi mode mapping */
-# endif
buf[i++] = c;
#else
buf[i++] = vgetc();