aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorwatiko <service@mail.watiko.net>2016-01-15 17:51:56 +0900
committerwatiko <service@mail.watiko.net>2016-02-01 03:47:09 +0900
commit594e3a64de2f2a0aac2dfdebbf5881ee3403c275 (patch)
treeb79493e27321a9b07f96ce549ca6e455dcf509b1 /src/nvim/ops.c
parent63560c9c89a85a5e034e39b785666776371c1a7e (diff)
downloadrneovim-594e3a64de2f2a0aac2dfdebbf5881ee3403c275.tar.gz
rneovim-594e3a64de2f2a0aac2dfdebbf5881ee3403c275.tar.bz2
rneovim-594e3a64de2f2a0aac2dfdebbf5881ee3403c275.zip
vim-patch:7.4.1076
Problem: CTRL-A does not work well in right-left mode. Solution: Remove reversing the line, add a test. (Hirohito Higashi) https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index c8894d6a91..71c4fa629e 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -4181,23 +4181,6 @@ static void block_prep(oparg_T *oap, struct block_def *bdp, linenr_T lnum, int i
bdp->textstart = pstart;
}
-
-static void reverse_line(char_u *s)
-{
- int i, j;
- char_u c;
-
- if ((i = (int)STRLEN(s) - 1) <= 0)
- return;
-
- curwin->w_cursor.col = i - curwin->w_cursor.col;
- for (j = 0; j < i; j++, i--) {
- c = s[i]; s[i] = s[j]; s[j] = c;
- }
-}
-
-# define RLADDSUBFIX(ptr) if (curwin->w_p_rl) reverse_line(ptr);
-
/// Add or subtract from a number in a line.
///
/// @param command CTRL-A for add, CTRL-X for subtract
@@ -4249,7 +4232,6 @@ int do_addsub(int command, linenr_T Prenum1, bool g_cmd)
}
ptr = ml_get(VIsual.lnum);
- RLADDSUBFIX(ptr);
if (VIsual_mode == 'V') {
VIsual.col = 0;
curwin->w_cursor.col = STRLEN(ptr);
@@ -4278,7 +4260,6 @@ int do_addsub(int command, linenr_T Prenum1, bool g_cmd)
lnume = curwin->w_cursor.lnum;
} else {
ptr = get_cursor_line_ptr();
- RLADDSUBFIX(ptr);
if (dobin) {
while (col > 0 && ascii_isbdigit(ptr[col])) {
@@ -4345,7 +4326,6 @@ int do_addsub(int command, linenr_T Prenum1, bool g_cmd)
t = curwin->w_cursor;
curwin->w_cursor.lnum = i;
ptr = get_cursor_line_ptr();
- RLADDSUBFIX(ptr);
if ((int)STRLEN(ptr) <= col) {
// try again on next line
continue;
@@ -4601,8 +4581,6 @@ int do_addsub(int command, linenr_T Prenum1, bool g_cmd)
}
Prenum1 += offset;
curwin->w_set_curswant = true;
- ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, true);
- RLADDSUBFIX(ptr);
}
if (visual) {
// cursor at the top of the selection