|
Karsten Hopp |
68e9e5 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
68e9e5 |
Subject: Patch 7.4.634
|
|
Karsten Hopp |
68e9e5 |
Fcc: outbox
|
|
Karsten Hopp |
68e9e5 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
68e9e5 |
Mime-Version: 1.0
|
|
Karsten Hopp |
68e9e5 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
68e9e5 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
68e9e5 |
------------
|
|
Karsten Hopp |
68e9e5 |
|
|
Karsten Hopp |
68e9e5 |
Patch 7.4.634
|
|
Karsten Hopp |
68e9e5 |
Problem: Marks are not restored after redo + undo.
|
|
Karsten Hopp |
68e9e5 |
Solution: Fix the way marks are restored. (Olaf Dabrunz)
|
|
Karsten Hopp |
68e9e5 |
Files: src/undo.c, src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
|
|
Karsten Hopp |
68e9e5 |
src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
|
|
Karsten Hopp |
68e9e5 |
src/testdir/Make_vms.mms, src/testdir/Makefile,
|
|
Karsten Hopp |
68e9e5 |
src/testdir/test_marks.in, src/testdir/test_marks.ok
|
|
Karsten Hopp |
68e9e5 |
|
|
Karsten Hopp |
68e9e5 |
|
|
Karsten Hopp |
68e9e5 |
*** ../vim-7.4.633/src/undo.c 2014-09-11 22:49:42.208961131 +0200
|
|
Karsten Hopp |
68e9e5 |
--- src/undo.c 2015-02-17 13:35:48.520297460 +0100
|
|
Karsten Hopp |
68e9e5 |
***************
|
|
Karsten Hopp |
68e9e5 |
*** 2847,2857 ****
|
|
Karsten Hopp |
68e9e5 |
* restore marks from before undo/redo
|
|
Karsten Hopp |
68e9e5 |
*/
|
|
Karsten Hopp |
68e9e5 |
for (i = 0; i < NMARKS; ++i)
|
|
Karsten Hopp |
68e9e5 |
if (curhead->uh_namedm[i].lnum != 0)
|
|
Karsten Hopp |
68e9e5 |
- {
|
|
Karsten Hopp |
68e9e5 |
curbuf->b_namedm[i] = curhead->uh_namedm[i];
|
|
Karsten Hopp |
68e9e5 |
curhead->uh_namedm[i] = namedm[i];
|
|
Karsten Hopp |
68e9e5 |
! }
|
|
Karsten Hopp |
68e9e5 |
if (curhead->uh_visual.vi_start.lnum != 0)
|
|
Karsten Hopp |
68e9e5 |
{
|
|
Karsten Hopp |
68e9e5 |
curbuf->b_visual = curhead->uh_visual;
|
|
Karsten Hopp |
68e9e5 |
--- 2847,2860 ----
|
|
Karsten Hopp |
68e9e5 |
* restore marks from before undo/redo
|
|
Karsten Hopp |
68e9e5 |
*/
|
|
Karsten Hopp |
68e9e5 |
for (i = 0; i < NMARKS; ++i)
|
|
Karsten Hopp |
68e9e5 |
+ {
|
|
Karsten Hopp |
68e9e5 |
if (curhead->uh_namedm[i].lnum != 0)
|
|
Karsten Hopp |
68e9e5 |
curbuf->b_namedm[i] = curhead->uh_namedm[i];
|
|
Karsten Hopp |
68e9e5 |
+ if (namedm[i].lnum != 0)
|
|
Karsten Hopp |
68e9e5 |
curhead->uh_namedm[i] = namedm[i];
|
|
Karsten Hopp |
68e9e5 |
! else
|
|
Karsten Hopp |
68e9e5 |
! curhead->uh_namedm[i].lnum = 0;
|
|
Karsten Hopp |
68e9e5 |
! }
|
|
Karsten Hopp |
68e9e5 |
if (curhead->uh_visual.vi_start.lnum != 0)
|
|
Karsten Hopp |
68e9e5 |
{
|
|
Karsten Hopp |
68e9e5 |
curbuf->b_visual = curhead->uh_visual;
|
|
Karsten Hopp |
68e9e5 |
*** ../vim-7.4.633/src/testdir/Make_amiga.mak 2015-01-20 19:30:46.665275623 +0100
|
|
Karsten Hopp |
68e9e5 |
--- src/testdir/Make_amiga.mak 2015-02-17 13:31:58.339295211 +0100
|
|
Karsten Hopp |
68e9e5 |
***************
|
|
Karsten Hopp |
68e9e5 |
*** 48,53 ****
|
|
Karsten Hopp |
68e9e5 |
--- 48,54 ----
|
|
Karsten Hopp |
68e9e5 |
test_listlbr.out \
|
|
Karsten Hopp |
68e9e5 |
test_listlbr_utf8.out \
|
|
Karsten Hopp |
68e9e5 |
test_mapping.out \
|
|
Karsten Hopp |
68e9e5 |
+ test_marks.out \
|
|
Karsten Hopp |
68e9e5 |
test_nested_function.out \
|
|
Karsten Hopp |
68e9e5 |
test_options.out \
|
|
Karsten Hopp |
68e9e5 |
test_qf_title.out \
|
|
Karsten Hopp |
68e9e5 |
***************
|
|
Karsten Hopp |
68e9e5 |
*** 188,193 ****
|
|
Karsten Hopp |
68e9e5 |
--- 189,195 ----
|
|
Karsten Hopp |
68e9e5 |
test_listlbr.out: test_listlbr.in
|
|
Karsten Hopp |
68e9e5 |
test_listlbr_utf8.out: test_listlbr_utf8.in
|
|
Karsten Hopp |
68e9e5 |
test_mapping.out: test_mapping.in
|
|
Karsten Hopp |
68e9e5 |
+ test_marks.out: test_marks.in
|
|
Karsten Hopp |
68e9e5 |
test_nested_function.out: test_nested_function.in
|
|
Karsten Hopp |
68e9e5 |
test_options.out: test_options.in
|
|
Karsten Hopp |
68e9e5 |
test_qf_title.out: test_qf_title.in
|
|
Karsten Hopp |
68e9e5 |
*** ../vim-7.4.633/src/testdir/Make_dos.mak 2015-01-20 19:30:46.665275623 +0100
|
|
Karsten Hopp |
68e9e5 |
--- src/testdir/Make_dos.mak 2015-02-17 13:31:58.339295211 +0100
|
|
Karsten Hopp |
68e9e5 |
***************
|
|
Karsten Hopp |
68e9e5 |
*** 47,52 ****
|
|
Karsten Hopp |
68e9e5 |
--- 47,53 ----
|
|
Karsten Hopp |
68e9e5 |
test_listlbr.out \
|
|
Karsten Hopp |
68e9e5 |
test_listlbr_utf8.out \
|
|
Karsten Hopp |
68e9e5 |
test_mapping.out \
|
|
Karsten Hopp |
68e9e5 |
+ test_marks.out \
|
|
Karsten Hopp |
68e9e5 |
test_nested_function.out \
|
|
Karsten Hopp |
68e9e5 |
test_options.out \
|
|
Karsten Hopp |
68e9e5 |
test_qf_title.out \
|
|
Karsten Hopp |
68e9e5 |
*** ../vim-7.4.633/src/testdir/Make_ming.mak 2015-01-20 19:30:46.665275623 +0100
|
|
Karsten Hopp |
68e9e5 |
--- src/testdir/Make_ming.mak 2015-02-17 13:31:58.343295152 +0100
|
|
Karsten Hopp |
68e9e5 |
***************
|
|
Karsten Hopp |
68e9e5 |
*** 69,74 ****
|
|
Karsten Hopp |
68e9e5 |
--- 69,75 ----
|
|
Karsten Hopp |
68e9e5 |
test_listlbr.out \
|
|
Karsten Hopp |
68e9e5 |
test_listlbr_utf8.out \
|
|
Karsten Hopp |
68e9e5 |
test_mapping.out \
|
|
Karsten Hopp |
68e9e5 |
+ test_marks.out \
|
|
Karsten Hopp |
68e9e5 |
test_nested_function.out \
|
|
Karsten Hopp |
68e9e5 |
test_options.out \
|
|
Karsten Hopp |
68e9e5 |
test_qf_title.out \
|
|
Karsten Hopp |
68e9e5 |
*** ../vim-7.4.633/src/testdir/Make_os2.mak 2015-01-20 19:30:46.665275623 +0100
|
|
Karsten Hopp |
68e9e5 |
--- src/testdir/Make_os2.mak 2015-02-17 13:31:58.343295152 +0100
|
|
Karsten Hopp |
68e9e5 |
***************
|
|
Karsten Hopp |
68e9e5 |
*** 49,54 ****
|
|
Karsten Hopp |
68e9e5 |
--- 49,55 ----
|
|
Karsten Hopp |
68e9e5 |
test_listlbr.out \
|
|
Karsten Hopp |
68e9e5 |
test_listlbr_utf8.out \
|
|
Karsten Hopp |
68e9e5 |
test_mapping.out \
|
|
Karsten Hopp |
68e9e5 |
+ test_marks.out \
|
|
Karsten Hopp |
68e9e5 |
test_nested_function.out \
|
|
Karsten Hopp |
68e9e5 |
test_options.out \
|
|
Karsten Hopp |
68e9e5 |
test_qf_title.out \
|
|
Karsten Hopp |
68e9e5 |
*** ../vim-7.4.633/src/testdir/Make_vms.mms 2015-01-20 19:30:46.669275579 +0100
|
|
Karsten Hopp |
68e9e5 |
--- src/testdir/Make_vms.mms 2015-02-17 13:31:58.343295152 +0100
|
|
Karsten Hopp |
68e9e5 |
***************
|
|
Karsten Hopp |
68e9e5 |
*** 108,113 ****
|
|
Karsten Hopp |
68e9e5 |
--- 108,114 ----
|
|
Karsten Hopp |
68e9e5 |
test_listlbr.out \
|
|
Karsten Hopp |
68e9e5 |
test_listlbr_utf8.out \
|
|
Karsten Hopp |
68e9e5 |
test_mapping.out \
|
|
Karsten Hopp |
68e9e5 |
+ test_marks.out \
|
|
Karsten Hopp |
68e9e5 |
test_nested_function.out \
|
|
Karsten Hopp |
68e9e5 |
test_options.out \
|
|
Karsten Hopp |
68e9e5 |
test_qf_title.out \
|
|
Karsten Hopp |
68e9e5 |
*** ../vim-7.4.633/src/testdir/Makefile 2015-01-20 19:30:46.669275579 +0100
|
|
Karsten Hopp |
68e9e5 |
--- src/testdir/Makefile 2015-02-17 13:31:58.343295152 +0100
|
|
Karsten Hopp |
68e9e5 |
***************
|
|
Karsten Hopp |
68e9e5 |
*** 45,50 ****
|
|
Karsten Hopp |
68e9e5 |
--- 45,51 ----
|
|
Karsten Hopp |
68e9e5 |
test_listlbr.out \
|
|
Karsten Hopp |
68e9e5 |
test_listlbr_utf8.out \
|
|
Karsten Hopp |
68e9e5 |
test_mapping.out \
|
|
Karsten Hopp |
68e9e5 |
+ test_marks.out \
|
|
Karsten Hopp |
68e9e5 |
test_nested_function.out \
|
|
Karsten Hopp |
68e9e5 |
test_options.out \
|
|
Karsten Hopp |
68e9e5 |
test_qf_title.out \
|
|
Karsten Hopp |
68e9e5 |
*** ../vim-7.4.633/src/testdir/test_marks.in 2015-02-17 13:42:37.010978266 +0100
|
|
Karsten Hopp |
68e9e5 |
--- src/testdir/test_marks.in 2015-02-17 13:31:58.343295152 +0100
|
|
Karsten Hopp |
68e9e5 |
***************
|
|
Karsten Hopp |
68e9e5 |
*** 0 ****
|
|
Karsten Hopp |
68e9e5 |
--- 1,18 ----
|
|
Karsten Hopp |
68e9e5 |
+ Tests for marks.
|
|
Karsten Hopp |
68e9e5 |
+
|
|
Karsten Hopp |
68e9e5 |
+ STARTTEST
|
|
Karsten Hopp |
68e9e5 |
+ :so small.vim
|
|
Karsten Hopp |
68e9e5 |
+ :" test that a deleted mark is restored after delete-undo-redo-undo
|
|
Karsten Hopp |
68e9e5 |
+ :/^\t/+1
|
|
Karsten Hopp |
68e9e5 |
+ :set nocp viminfo+=nviminfo
|
|
Karsten Hopp |
68e9e5 |
+ maddu?u
|
|
Karsten Hopp |
68e9e5 |
+ :let a = string(getpos("'a"))
|
|
Karsten Hopp |
68e9e5 |
+ :$put ='Mark after delete-undo-redo-undo: '.a
|
|
Karsten Hopp |
68e9e5 |
+ :/^\t/,$wq! test.out
|
|
Karsten Hopp |
68e9e5 |
+ ENDTEST
|
|
Karsten Hopp |
68e9e5 |
+
|
|
Karsten Hopp |
68e9e5 |
+ textline A
|
|
Karsten Hopp |
68e9e5 |
+ textline B
|
|
Karsten Hopp |
68e9e5 |
+ textline C
|
|
Karsten Hopp |
68e9e5 |
+
|
|
Karsten Hopp |
68e9e5 |
+ Results:
|
|
Karsten Hopp |
68e9e5 |
*** ../vim-7.4.633/src/testdir/test_marks.ok 2015-02-17 13:42:37.014978213 +0100
|
|
Karsten Hopp |
68e9e5 |
--- src/testdir/test_marks.ok 2015-02-17 13:31:58.343295152 +0100
|
|
Karsten Hopp |
68e9e5 |
***************
|
|
Karsten Hopp |
68e9e5 |
*** 0 ****
|
|
Karsten Hopp |
68e9e5 |
--- 1,6 ----
|
|
Karsten Hopp |
68e9e5 |
+ textline A
|
|
Karsten Hopp |
68e9e5 |
+ textline B
|
|
Karsten Hopp |
68e9e5 |
+ textline C
|
|
Karsten Hopp |
68e9e5 |
+
|
|
Karsten Hopp |
68e9e5 |
+ Results:
|
|
Karsten Hopp |
68e9e5 |
+ Mark after delete-undo-redo-undo: [0, 15, 2, 0]
|
|
Karsten Hopp |
68e9e5 |
*** ../vim-7.4.633/src/version.c 2015-02-17 12:44:04.376749160 +0100
|
|
Karsten Hopp |
68e9e5 |
--- src/version.c 2015-02-17 13:33:46.137891541 +0100
|
|
Karsten Hopp |
68e9e5 |
***************
|
|
Karsten Hopp |
68e9e5 |
*** 743,744 ****
|
|
Karsten Hopp |
68e9e5 |
--- 743,746 ----
|
|
Karsten Hopp |
68e9e5 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
68e9e5 |
+ /**/
|
|
Karsten Hopp |
68e9e5 |
+ 634,
|
|
Karsten Hopp |
68e9e5 |
/**/
|
|
Karsten Hopp |
68e9e5 |
|
|
Karsten Hopp |
68e9e5 |
--
|
|
Karsten Hopp |
68e9e5 |
"Women marry men hoping they will change. Men marry women hoping
|
|
Karsten Hopp |
68e9e5 |
they will not. So each is inevitably disappointed."
|
|
Karsten Hopp |
68e9e5 |
- Einstein
|
|
Karsten Hopp |
68e9e5 |
|
|
Karsten Hopp |
68e9e5 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
68e9e5 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
68e9e5 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
68e9e5 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|