diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-02-17 10:54:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-17 10:54:00 +0100 |
commit | 33ce70c8833a4ee0422b8865c7438fe6676cdd6c (patch) | |
tree | a3c2c7b74745729773dbac16070d43db1c8f7d09 /src/nvim/edit.c | |
parent | dc9dd8d664f2ffec3d199f96e4605cb0729497ec (diff) | |
download | rneovim-33ce70c8833a4ee0422b8865c7438fe6676cdd6c.tar.gz rneovim-33ce70c8833a4ee0422b8865c7438fe6676cdd6c.tar.bz2 rneovim-33ce70c8833a4ee0422b8865c7438fe6676cdd6c.zip |
vim-patch:8.1.0932: remove Farsi support (#9622)
Problem: Farsi support is outdated and unused.
Solution: Delete the Farsi support.
https://github.com/vim/vim/commit/14184a3133b9a6ee5f711d493c04e41ba4fa7c2f
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 42 |
1 files changed, 5 insertions, 37 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 62b35fa708..5a21c50fa6 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -21,7 +21,6 @@ #include "nvim/eval/typval.h" #include "nvim/ex_docmd.h" #include "nvim/ex_getln.h" -#include "nvim/farsi.h" #include "nvim/fileio.h" #include "nvim/fold.h" #include "nvim/getchar.h" @@ -342,13 +341,7 @@ static void insert_enter(InsertState *s) } if (s->cmdchar == 'R') { - if (p_fkmap && p_ri) { - beep_flush(); - EMSG(farsi_text_3); // encoded in Farsi - State = INSERT; - } else { - State = REPLACE; - } + State = REPLACE; } else if (s->cmdchar == 'V' || s->cmdchar == 'v') { State = VREPLACE; s->replaceState = VREPLACE; @@ -630,10 +623,6 @@ static int insert_execute(VimState *state, int key) s->c = hkmap(s->c); // Hebrew mode mapping } - if (p_fkmap && KeyTyped) { - s->c = fkmap(s->c); // Farsi mode mapping - } - // Special handling of keys while the popup menu is visible or wanted // and the cursor is still in the completed word. Only when there is // a match, skip this when no matches were found. @@ -5344,7 +5333,6 @@ insertchar ( && !ISSPECIAL(c) && MB_BYTE2LEN(c) == 1 && i < INPUT_BUFLEN - && !(p_fkmap && KeyTyped) // Farsi mode mapping moves cursor && (textwidth == 0 || (virtcol += byte2cells(buf[i - 1])) < (colnr_T)textwidth) && !(!no_abbr && !vim_iswordc(c) && vim_iswordc(buf[i - 1]))) { @@ -7379,19 +7367,7 @@ static void ins_ctrl_(void) undisplay_dollar(); } else revins_scol = -1; - if (p_altkeymap) { - /* - * to be consistent also for redo command, using '.' - * set arrow_used to true and stop it - causing to redo - * characters entered in one mode (normal/reverse insert). - */ - arrow_used = TRUE; - (void)stop_arrow(); - p_fkmap = curwin->w_p_rl ^ p_ri; - if (p_fkmap && p_ri) - State = INSERT; - } else - p_hkmap = curwin->w_p_rl ^ p_ri; /* be consistent! */ + p_hkmap = curwin->w_p_rl ^ p_ri; // be consistent! showmode(); } @@ -7444,12 +7420,6 @@ static bool ins_start_select(int c) */ static void ins_insert(int replaceState) { - if (p_fkmap && p_ri) { - beep_flush(); - EMSG(farsi_text_3); /* encoded in Farsi */ - return; - } - set_vim_var_string(VV_INSERTMODE, ((State & REPLACE_FLAG) ? "i" : replaceState == VREPLACE ? "v" : "r"), 1); @@ -8423,12 +8393,10 @@ static bool ins_eol(int c) if (virtual_active() && curwin->w_cursor.coladd > 0) coladvance(getviscol()); - if (p_altkeymap && p_fkmap) - fkmap(NL); - /* NL in reverse insert will always start in the end of - * current line. */ - if (revins_on) + // NL in reverse insert will always start in the end of current line. + if (revins_on) { curwin->w_cursor.col += (colnr_T)STRLEN(get_cursor_pos_ptr()); + } AppendToRedobuff(NL_STR); bool i = open_line(FORWARD, |