|
Karsten Hopp |
ee9c34 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
ee9c34 |
Subject: Patch 7.4.2
|
|
Karsten Hopp |
ee9c34 |
Fcc: outbox
|
|
Karsten Hopp |
ee9c34 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
ee9c34 |
Mime-Version: 1.0
|
|
Karsten Hopp |
ee9c34 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
ee9c34 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
ee9c34 |
------------
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
Patch 7.4.267 (after 7.4.178)
|
|
Karsten Hopp |
ee9c34 |
Problem: The '[ mark is in the wrong position after "gq". (Ingo Karkat)
|
|
Karsten Hopp |
ee9c34 |
Solution: Add the setmark argument to do_join(). (Christian Brabandt)
|
|
Karsten Hopp |
ee9c34 |
Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
|
|
Karsten Hopp |
ee9c34 |
src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
|
|
Karsten Hopp |
ee9c34 |
src/testdir/Make_vms.mms, src/testdir/Makefile,
|
|
Karsten Hopp |
ee9c34 |
src/testdir/test_autoformat_join.in,
|
|
Karsten Hopp |
ee9c34 |
src/testdir/test_autoformat_join.ok, src/Makefile, src/edit.c,
|
|
Karsten Hopp |
ee9c34 |
src/ex_cmds.c, src/ex_docmd.c, src/normal.c, src/ops.c,
|
|
Karsten Hopp |
ee9c34 |
src/proto/ops.pro
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/testdir/Make_amiga.mak 2014-04-02 19:54:58.275599459 +0200
|
|
Karsten Hopp |
ee9c34 |
--- src/testdir/Make_amiga.mak 2014-04-29 12:02:34.144046123 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 36,41 ****
|
|
Karsten Hopp |
ee9c34 |
--- 36,42 ----
|
|
Karsten Hopp |
ee9c34 |
test94.out test95.out test96.out test97.out test98.out \
|
|
Karsten Hopp |
ee9c34 |
test99.out test100.out test101.out test102.out test103.out \
|
|
Karsten Hopp |
ee9c34 |
test104.out test105.out test106.out \
|
|
Karsten Hopp |
ee9c34 |
+ test_autoformat_join.out \
|
|
Karsten Hopp |
ee9c34 |
test_eval.out \
|
|
Karsten Hopp |
ee9c34 |
test_options.out
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 160,164 ****
|
|
Karsten Hopp |
ee9c34 |
--- 161,166 ----
|
|
Karsten Hopp |
ee9c34 |
test104.out: test104.in
|
|
Karsten Hopp |
ee9c34 |
test105.out: test105.in
|
|
Karsten Hopp |
ee9c34 |
test106.out: test106.in
|
|
Karsten Hopp |
ee9c34 |
+ test_autoformat_join.out: test_autoformat_join.in
|
|
Karsten Hopp |
ee9c34 |
test_eval.out: test_eval.in
|
|
Karsten Hopp |
ee9c34 |
test_options.out: test_options.in
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/testdir/Make_dos.mak 2014-04-02 19:54:58.275599459 +0200
|
|
Karsten Hopp |
ee9c34 |
--- src/testdir/Make_dos.mak 2014-04-29 12:02:45.128045931 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 35,40 ****
|
|
Karsten Hopp |
ee9c34 |
--- 35,41 ----
|
|
Karsten Hopp |
ee9c34 |
test94.out test95.out test96.out test98.out test99.out \
|
|
Karsten Hopp |
ee9c34 |
test100.out test101.out test102.out test103.out test104.out \
|
|
Karsten Hopp |
ee9c34 |
test105.out test106.out \
|
|
Karsten Hopp |
ee9c34 |
+ test_autoformat_join.out \
|
|
Karsten Hopp |
ee9c34 |
test_eval.out \
|
|
Karsten Hopp |
ee9c34 |
test_options.out
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/testdir/Make_ming.mak 2014-04-02 19:54:58.275599459 +0200
|
|
Karsten Hopp |
ee9c34 |
--- src/testdir/Make_ming.mak 2014-04-29 12:02:54.020045775 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 55,60 ****
|
|
Karsten Hopp |
ee9c34 |
--- 55,61 ----
|
|
Karsten Hopp |
ee9c34 |
test94.out test95.out test96.out test98.out test99.out \
|
|
Karsten Hopp |
ee9c34 |
test100.out test101.out test102.out test103.out test104.out \
|
|
Karsten Hopp |
ee9c34 |
test105.out test106.out \
|
|
Karsten Hopp |
ee9c34 |
+ test_autoformat_join.out \
|
|
Karsten Hopp |
ee9c34 |
test_eval.out \
|
|
Karsten Hopp |
ee9c34 |
test_options.out
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/testdir/Make_os2.mak 2014-04-02 19:54:58.275599459 +0200
|
|
Karsten Hopp |
ee9c34 |
--- src/testdir/Make_os2.mak 2014-04-29 12:03:03.384045611 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 37,42 ****
|
|
Karsten Hopp |
ee9c34 |
--- 37,43 ----
|
|
Karsten Hopp |
ee9c34 |
test94.out test95.out test96.out test98.out test99.out \
|
|
Karsten Hopp |
ee9c34 |
test100.out test101.out test102.out test103.out test104.out \
|
|
Karsten Hopp |
ee9c34 |
test105.out test106.out \
|
|
Karsten Hopp |
ee9c34 |
+ test_autoformat_join.out \
|
|
Karsten Hopp |
ee9c34 |
test_eval.out \
|
|
Karsten Hopp |
ee9c34 |
test_options.out
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/testdir/Make_vms.mms 2014-04-02 19:54:58.275599459 +0200
|
|
Karsten Hopp |
ee9c34 |
--- src/testdir/Make_vms.mms 2014-04-29 12:03:12.200045456 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 96,101 ****
|
|
Karsten Hopp |
ee9c34 |
--- 96,102 ----
|
|
Karsten Hopp |
ee9c34 |
test95.out test96.out test98.out test99.out \
|
|
Karsten Hopp |
ee9c34 |
test100.out test101.out test103.out test104.out \
|
|
Karsten Hopp |
ee9c34 |
test105.out test106.out \
|
|
Karsten Hopp |
ee9c34 |
+ test_autoformat_join.out \
|
|
Karsten Hopp |
ee9c34 |
test_eval.out \
|
|
Karsten Hopp |
ee9c34 |
test_options.out
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/testdir/Makefile 2014-04-01 14:08:14.685074130 +0200
|
|
Karsten Hopp |
ee9c34 |
--- src/testdir/Makefile 2014-04-29 12:02:09.152046561 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 33,38 ****
|
|
Karsten Hopp |
ee9c34 |
--- 33,40 ----
|
|
Karsten Hopp |
ee9c34 |
test94.out test95.out test96.out test97.out test98.out \
|
|
Karsten Hopp |
ee9c34 |
test99.out test100.out test101.out test102.out test103.out \
|
|
Karsten Hopp |
ee9c34 |
test104.out test105.out test106.out \
|
|
Karsten Hopp |
ee9c34 |
+ test_autoformat_join.out \
|
|
Karsten Hopp |
ee9c34 |
+ test_eval.out \
|
|
Karsten Hopp |
ee9c34 |
test_options.out
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
SCRIPTS_GUI = test16.out
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/testdir/test_autoformat_join.in 2014-04-29 12:12:57.324035202 +0200
|
|
Karsten Hopp |
ee9c34 |
--- src/testdir/test_autoformat_join.in 2014-04-29 12:00:35.360048205 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 0 ****
|
|
Karsten Hopp |
ee9c34 |
--- 1,23 ----
|
|
Karsten Hopp |
ee9c34 |
+ Tests for setting the '[,'] marks when joining lines.
|
|
Karsten Hopp |
ee9c34 |
+
|
|
Karsten Hopp |
ee9c34 |
+ STARTTEST
|
|
Karsten Hopp |
ee9c34 |
+ :so small.vim
|
|
Karsten Hopp |
ee9c34 |
+ :/^\t\t/
|
|
Karsten Hopp |
ee9c34 |
+ 0gqj?
|
|
Karsten Hopp |
ee9c34 |
+ :let a=string(getpos("'[")).'/'.string(getpos("']"))
|
|
Karsten Hopp |
ee9c34 |
+ :/^This line/;'}-join
|
|
Karsten Hopp |
ee9c34 |
+ :let b=string(getpos("'[")).'/'.string(getpos("']"))
|
|
Karsten Hopp |
ee9c34 |
+ :$put ='First test: Start/End '.string(a)
|
|
Karsten Hopp |
ee9c34 |
+ :$put ='Second test: Start/End '.string(b)
|
|
Karsten Hopp |
ee9c34 |
+ :/^\t\t/,$wq! test.out
|
|
Karsten Hopp |
ee9c34 |
+ ENDTEST
|
|
Karsten Hopp |
ee9c34 |
+
|
|
Karsten Hopp |
ee9c34 |
+
|
|
Karsten Hopp |
ee9c34 |
+ O sodales, ludite, vos qui
|
|
Karsten Hopp |
ee9c34 |
+ attamen consulite per voster honur. Tua pulchra facies me fay planszer milies
|
|
Karsten Hopp |
ee9c34 |
+
|
|
Karsten Hopp |
ee9c34 |
+ This line.
|
|
Karsten Hopp |
ee9c34 |
+ Should be joined with the next line
|
|
Karsten Hopp |
ee9c34 |
+ and with this line
|
|
Karsten Hopp |
ee9c34 |
+
|
|
Karsten Hopp |
ee9c34 |
+ Results:
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/testdir/test_autoformat_join.ok 2014-04-29 12:12:57.332035201 +0200
|
|
Karsten Hopp |
ee9c34 |
--- src/testdir/test_autoformat_join.ok 2014-04-29 12:00:35.360048205 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 0 ****
|
|
Karsten Hopp |
ee9c34 |
--- 1,8 ----
|
|
Karsten Hopp |
ee9c34 |
+ O sodales, ludite, vos qui attamen consulite per voster honur.
|
|
Karsten Hopp |
ee9c34 |
+ Tua pulchra facies me fay planszer milies
|
|
Karsten Hopp |
ee9c34 |
+
|
|
Karsten Hopp |
ee9c34 |
+ This line. Should be joined with the next line and with this line
|
|
Karsten Hopp |
ee9c34 |
+
|
|
Karsten Hopp |
ee9c34 |
+ Results:
|
|
Karsten Hopp |
ee9c34 |
+ First test: Start/End '[0, 16, 1, 0]/[0, 17, 1, 0]'
|
|
Karsten Hopp |
ee9c34 |
+ Second test: Start/End '[0, 19, 11, 0]/[0, 19, 67, 0]'
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/Makefile 2014-04-02 19:54:58.275599459 +0200
|
|
Karsten Hopp |
ee9c34 |
--- src/Makefile 2014-04-29 12:03:48.600044818 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 1880,1885 ****
|
|
Karsten Hopp |
ee9c34 |
--- 1880,1886 ----
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
# Run individual test, assuming that Vim was already compiled.
|
|
Karsten Hopp |
ee9c34 |
test1 test2 test3 test4 test5 test6 test7 test8 test9 \
|
|
Karsten Hopp |
ee9c34 |
+ test_autoformat_join \
|
|
Karsten Hopp |
ee9c34 |
test_eval \
|
|
Karsten Hopp |
ee9c34 |
test_options \
|
|
Karsten Hopp |
ee9c34 |
test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 \
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/edit.c 2014-03-23 15:12:29.915264336 +0100
|
|
Karsten Hopp |
ee9c34 |
--- src/edit.c 2014-04-29 12:08:50.608039525 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 8685,8691 ****
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
temp = curwin->w_cursor.col;
|
|
Karsten Hopp |
ee9c34 |
if (!can_bs(BS_EOL) /* only if "eol" included */
|
|
Karsten Hopp |
ee9c34 |
! || do_join(2, FALSE, TRUE, FALSE) == FAIL)
|
|
Karsten Hopp |
ee9c34 |
vim_beep();
|
|
Karsten Hopp |
ee9c34 |
else
|
|
Karsten Hopp |
ee9c34 |
curwin->w_cursor.col = temp;
|
|
Karsten Hopp |
ee9c34 |
--- 8685,8691 ----
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
temp = curwin->w_cursor.col;
|
|
Karsten Hopp |
ee9c34 |
if (!can_bs(BS_EOL) /* only if "eol" included */
|
|
Karsten Hopp |
ee9c34 |
! || do_join(2, FALSE, TRUE, FALSE, FALSE) == FAIL)
|
|
Karsten Hopp |
ee9c34 |
vim_beep();
|
|
Karsten Hopp |
ee9c34 |
else
|
|
Karsten Hopp |
ee9c34 |
curwin->w_cursor.col = temp;
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 8866,8872 ****
|
|
Karsten Hopp |
ee9c34 |
ptr[len - 1] = NUL;
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
! (void)do_join(2, FALSE, FALSE, FALSE);
|
|
Karsten Hopp |
ee9c34 |
if (temp == NUL && gchar_cursor() != NUL)
|
|
Karsten Hopp |
ee9c34 |
inc_cursor();
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
--- 8866,8872 ----
|
|
Karsten Hopp |
ee9c34 |
ptr[len - 1] = NUL;
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
! (void)do_join(2, FALSE, FALSE, FALSE, FALSE);
|
|
Karsten Hopp |
ee9c34 |
if (temp == NUL && gchar_cursor() != NUL)
|
|
Karsten Hopp |
ee9c34 |
inc_cursor();
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/ex_cmds.c 2014-04-06 20:45:40.119357453 +0200
|
|
Karsten Hopp |
ee9c34 |
--- src/ex_cmds.c 2014-04-29 12:08:50.612039525 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 4444,4450 ****
|
|
Karsten Hopp |
ee9c34 |
else if (*cmd == 'p')
|
|
Karsten Hopp |
ee9c34 |
eap->flags = EXFLAG_PRINT;
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
! (void)do_join(eap->line2 - eap->line1 + 1, FALSE, TRUE, FALSE);
|
|
Karsten Hopp |
ee9c34 |
sub_nlines = sub_nsubs = eap->line2 - eap->line1 + 1;
|
|
Karsten Hopp |
ee9c34 |
(void)do_sub_msg(FALSE);
|
|
Karsten Hopp |
ee9c34 |
ex_may_print(eap);
|
|
Karsten Hopp |
ee9c34 |
--- 4444,4450 ----
|
|
Karsten Hopp |
ee9c34 |
else if (*cmd == 'p')
|
|
Karsten Hopp |
ee9c34 |
eap->flags = EXFLAG_PRINT;
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
! (void)do_join(eap->line2 - eap->line1 + 1, FALSE, TRUE, FALSE, TRUE);
|
|
Karsten Hopp |
ee9c34 |
sub_nlines = sub_nsubs = eap->line2 - eap->line1 + 1;
|
|
Karsten Hopp |
ee9c34 |
(void)do_sub_msg(FALSE);
|
|
Karsten Hopp |
ee9c34 |
ex_may_print(eap);
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/ex_docmd.c 2014-04-02 14:22:00.119874274 +0200
|
|
Karsten Hopp |
ee9c34 |
--- src/ex_docmd.c 2014-04-29 12:08:50.616039525 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 8717,8723 ****
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
++eap->line2;
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
! (void)do_join(eap->line2 - eap->line1 + 1, !eap->forceit, TRUE, TRUE);
|
|
Karsten Hopp |
ee9c34 |
beginline(BL_WHITE | BL_FIX);
|
|
Karsten Hopp |
ee9c34 |
ex_may_print(eap);
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
--- 8717,8723 ----
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
++eap->line2;
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
! (void)do_join(eap->line2 - eap->line1 + 1, !eap->forceit, TRUE, TRUE, TRUE);
|
|
Karsten Hopp |
ee9c34 |
beginline(BL_WHITE | BL_FIX);
|
|
Karsten Hopp |
ee9c34 |
ex_may_print(eap);
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/normal.c 2014-03-23 15:12:29.927264336 +0100
|
|
Karsten Hopp |
ee9c34 |
--- src/normal.c 2014-04-29 12:08:50.616039525 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 812,818 ****
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
if (text_locked() && (nv_cmds[idx].cmd_flags & NV_NCW))
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
! /* This command is not allowed while editing a ccmdline: beep. */
|
|
Karsten Hopp |
ee9c34 |
clearopbeep(oap);
|
|
Karsten Hopp |
ee9c34 |
text_locked_msg();
|
|
Karsten Hopp |
ee9c34 |
goto normal_end;
|
|
Karsten Hopp |
ee9c34 |
--- 812,818 ----
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
if (text_locked() && (nv_cmds[idx].cmd_flags & NV_NCW))
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
! /* This command is not allowed while editing a cmdline: beep. */
|
|
Karsten Hopp |
ee9c34 |
clearopbeep(oap);
|
|
Karsten Hopp |
ee9c34 |
text_locked_msg();
|
|
Karsten Hopp |
ee9c34 |
goto normal_end;
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 1905,1911 ****
|
|
Karsten Hopp |
ee9c34 |
else
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
(void)do_join(oap->line_count, oap->op_type == OP_JOIN,
|
|
Karsten Hopp |
ee9c34 |
! TRUE, TRUE);
|
|
Karsten Hopp |
ee9c34 |
auto_format(FALSE, TRUE);
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
break;
|
|
Karsten Hopp |
ee9c34 |
--- 1905,1911 ----
|
|
Karsten Hopp |
ee9c34 |
else
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
(void)do_join(oap->line_count, oap->op_type == OP_JOIN,
|
|
Karsten Hopp |
ee9c34 |
! TRUE, TRUE, TRUE);
|
|
Karsten Hopp |
ee9c34 |
auto_format(FALSE, TRUE);
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
break;
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 9236,9242 ****
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
prep_redo(cap->oap->regname, cap->count0,
|
|
Karsten Hopp |
ee9c34 |
NUL, cap->cmdchar, NUL, NUL, cap->nchar);
|
|
Karsten Hopp |
ee9c34 |
! (void)do_join(cap->count0, cap->nchar == NUL, TRUE, TRUE);
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
--- 9236,9242 ----
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
prep_redo(cap->oap->regname, cap->count0,
|
|
Karsten Hopp |
ee9c34 |
NUL, cap->cmdchar, NUL, NUL, cap->nchar);
|
|
Karsten Hopp |
ee9c34 |
! (void)do_join(cap->count0, cap->nchar == NUL, TRUE, TRUE, TRUE);
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/ops.c 2014-04-12 12:26:25.856424387 +0200
|
|
Karsten Hopp |
ee9c34 |
--- src/ops.c 2014-04-29 12:10:29.428037794 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 1979,1985 ****
|
|
Karsten Hopp |
ee9c34 |
curwin->w_cursor = curpos; /* restore curwin->w_cursor */
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
|
|
Karsten Hopp |
ee9c34 |
! (void)do_join(2, FALSE, FALSE, FALSE);
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
--- 1979,1985 ----
|
|
Karsten Hopp |
ee9c34 |
curwin->w_cursor = curpos; /* restore curwin->w_cursor */
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
|
|
Karsten Hopp |
ee9c34 |
! (void)do_join(2, FALSE, FALSE, FALSE, FALSE);
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 4323,4339 ****
|
|
Karsten Hopp |
ee9c34 |
/*
|
|
Karsten Hopp |
ee9c34 |
* Join 'count' lines (minimal 2) at cursor position.
|
|
Karsten Hopp |
ee9c34 |
* When "save_undo" is TRUE save lines for undo first.
|
|
Karsten Hopp |
ee9c34 |
! * Set "use_formatoptions" to FALSE when e.g. processing
|
|
Karsten Hopp |
ee9c34 |
! * backspace and comment leaders should not be removed.
|
|
Karsten Hopp |
ee9c34 |
*
|
|
Karsten Hopp |
ee9c34 |
* return FAIL for failure, OK otherwise
|
|
Karsten Hopp |
ee9c34 |
*/
|
|
Karsten Hopp |
ee9c34 |
int
|
|
Karsten Hopp |
ee9c34 |
! do_join(count, insert_space, save_undo, use_formatoptions)
|
|
Karsten Hopp |
ee9c34 |
long count;
|
|
Karsten Hopp |
ee9c34 |
int insert_space;
|
|
Karsten Hopp |
ee9c34 |
int save_undo;
|
|
Karsten Hopp |
ee9c34 |
int use_formatoptions UNUSED;
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
char_u *curr = NULL;
|
|
Karsten Hopp |
ee9c34 |
char_u *curr_start = NULL;
|
|
Karsten Hopp |
ee9c34 |
--- 4323,4342 ----
|
|
Karsten Hopp |
ee9c34 |
/*
|
|
Karsten Hopp |
ee9c34 |
* Join 'count' lines (minimal 2) at cursor position.
|
|
Karsten Hopp |
ee9c34 |
* When "save_undo" is TRUE save lines for undo first.
|
|
Karsten Hopp |
ee9c34 |
! * Set "use_formatoptions" to FALSE when e.g. processing backspace and comment
|
|
Karsten Hopp |
ee9c34 |
! * leaders should not be removed.
|
|
Karsten Hopp |
ee9c34 |
! * When setmark is TRUE, sets the '[ and '] mark, else, the caller is expected
|
|
Karsten Hopp |
ee9c34 |
! * to set those marks.
|
|
Karsten Hopp |
ee9c34 |
*
|
|
Karsten Hopp |
ee9c34 |
* return FAIL for failure, OK otherwise
|
|
Karsten Hopp |
ee9c34 |
*/
|
|
Karsten Hopp |
ee9c34 |
int
|
|
Karsten Hopp |
ee9c34 |
! do_join(count, insert_space, save_undo, use_formatoptions, setmark)
|
|
Karsten Hopp |
ee9c34 |
long count;
|
|
Karsten Hopp |
ee9c34 |
int insert_space;
|
|
Karsten Hopp |
ee9c34 |
int save_undo;
|
|
Karsten Hopp |
ee9c34 |
int use_formatoptions UNUSED;
|
|
Karsten Hopp |
ee9c34 |
+ int setmark;
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
char_u *curr = NULL;
|
|
Karsten Hopp |
ee9c34 |
char_u *curr_start = NULL;
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 4384,4390 ****
|
|
Karsten Hopp |
ee9c34 |
for (t = 0; t < count; ++t)
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t));
|
|
Karsten Hopp |
ee9c34 |
! if (t == 0)
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
/* Set the '[ mark. */
|
|
Karsten Hopp |
ee9c34 |
curwin->w_buffer->b_op_start.lnum = curwin->w_cursor.lnum;
|
|
Karsten Hopp |
ee9c34 |
--- 4387,4393 ----
|
|
Karsten Hopp |
ee9c34 |
for (t = 0; t < count; ++t)
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t));
|
|
Karsten Hopp |
ee9c34 |
! if (t == 0 && setmark)
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
/* Set the '[ mark. */
|
|
Karsten Hopp |
ee9c34 |
curwin->w_buffer->b_op_start.lnum = curwin->w_cursor.lnum;
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 4506,4514 ****
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
ml_replace(curwin->w_cursor.lnum, newp, FALSE);
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
! /* Set the '] mark. */
|
|
Karsten Hopp |
ee9c34 |
! curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
|
|
Karsten Hopp |
ee9c34 |
! curwin->w_buffer->b_op_end.col = (colnr_T)STRLEN(newp);
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
/* Only report the change in the first line here, del_lines() will report
|
|
Karsten Hopp |
ee9c34 |
* the deleted line. */
|
|
Karsten Hopp |
ee9c34 |
--- 4509,4520 ----
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
ml_replace(curwin->w_cursor.lnum, newp, FALSE);
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
! if (setmark)
|
|
Karsten Hopp |
ee9c34 |
! {
|
|
Karsten Hopp |
ee9c34 |
! /* Set the '] mark. */
|
|
Karsten Hopp |
ee9c34 |
! curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
|
|
Karsten Hopp |
ee9c34 |
! curwin->w_buffer->b_op_end.col = (colnr_T)STRLEN(newp);
|
|
Karsten Hopp |
ee9c34 |
! }
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
/* Only report the change in the first line here, del_lines() will report
|
|
Karsten Hopp |
ee9c34 |
* the deleted line. */
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 5009,5015 ****
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
curwin->w_cursor.lnum--;
|
|
Karsten Hopp |
ee9c34 |
! if (do_join(2, TRUE, FALSE, FALSE) == FAIL)
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
beep_flush();
|
|
Karsten Hopp |
ee9c34 |
break;
|
|
Karsten Hopp |
ee9c34 |
--- 5015,5021 ----
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
}
|
|
Karsten Hopp |
ee9c34 |
curwin->w_cursor.lnum--;
|
|
Karsten Hopp |
ee9c34 |
! if (do_join(2, TRUE, FALSE, FALSE, FALSE) == FAIL)
|
|
Karsten Hopp |
ee9c34 |
{
|
|
Karsten Hopp |
ee9c34 |
beep_flush();
|
|
Karsten Hopp |
ee9c34 |
break;
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/proto/ops.pro 2014-04-02 22:17:00.003482236 +0200
|
|
Karsten Hopp |
ee9c34 |
--- src/proto/ops.pro 2014-04-29 12:08:50.620039525 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 37,43 ****
|
|
Karsten Hopp |
ee9c34 |
int preprocs_left __ARGS((void));
|
|
Karsten Hopp |
ee9c34 |
int get_register_name __ARGS((int num));
|
|
Karsten Hopp |
ee9c34 |
void ex_display __ARGS((exarg_T *eap));
|
|
Karsten Hopp |
ee9c34 |
! int do_join __ARGS((long count, int insert_space, int save_undo, int use_formatoptions));
|
|
Karsten Hopp |
ee9c34 |
void op_format __ARGS((oparg_T *oap, int keep_cursor));
|
|
Karsten Hopp |
ee9c34 |
void op_formatexpr __ARGS((oparg_T *oap));
|
|
Karsten Hopp |
ee9c34 |
int fex_format __ARGS((linenr_T lnum, long count, int c));
|
|
Karsten Hopp |
ee9c34 |
--- 37,43 ----
|
|
Karsten Hopp |
ee9c34 |
int preprocs_left __ARGS((void));
|
|
Karsten Hopp |
ee9c34 |
int get_register_name __ARGS((int num));
|
|
Karsten Hopp |
ee9c34 |
void ex_display __ARGS((exarg_T *eap));
|
|
Karsten Hopp |
ee9c34 |
! int do_join __ARGS((long count, int insert_space, int save_undo, int use_formatoptions, int setmark));
|
|
Karsten Hopp |
ee9c34 |
void op_format __ARGS((oparg_T *oap, int keep_cursor));
|
|
Karsten Hopp |
ee9c34 |
void op_formatexpr __ARGS((oparg_T *oap));
|
|
Karsten Hopp |
ee9c34 |
int fex_format __ARGS((linenr_T lnum, long count, int c));
|
|
Karsten Hopp |
ee9c34 |
*** ../vim-7.4.266/src/version.c 2014-04-29 11:55:26.176053624 +0200
|
|
Karsten Hopp |
ee9c34 |
--- src/version.c 2014-04-29 11:59:35.620049252 +0200
|
|
Karsten Hopp |
ee9c34 |
***************
|
|
Karsten Hopp |
ee9c34 |
*** 736,737 ****
|
|
Karsten Hopp |
ee9c34 |
--- 736,739 ----
|
|
Karsten Hopp |
ee9c34 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
ee9c34 |
+ /**/
|
|
Karsten Hopp |
ee9c34 |
+ 267,
|
|
Karsten Hopp |
ee9c34 |
/**/
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
--
|
|
Karsten Hopp |
ee9c34 |
I AM THANKFUL...
|
|
Karsten Hopp |
ee9c34 |
...for all the complaining I hear about the government
|
|
Karsten Hopp |
ee9c34 |
because it means we have freedom of speech.
|
|
Karsten Hopp |
ee9c34 |
|
|
Karsten Hopp |
ee9c34 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
ee9c34 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
ee9c34 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
ee9c34 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|