man.vim: Uniformly place cursor at the same column with `Ctrl-t` (#12608)

Commit: 
https://github.com/vim/vim/commit/6e5ab2b994c3356fe91e8f9b701df52146fc0985
Author: goweol <[email protected]>
Date:   Fri Aug 18 06:12:42 2023 +0900

    man.vim: Uniformly place cursor at the same column with `Ctrl-t` 
(https://github.com/vim/vim/issues/12608)
    
    Functions col and cursor count each tab (0x9) as a byte, and
    are complementary. On the other hand, the | command motion
    takes into consideration how many screen columns a tab does
    occupy and may move cursor to a column closer to the start
    of line than col would report at that position.
    
    The provided changes prefer the cursor function to the | command.
    
    Co-authored-by: Aliaksei Budavei <[email protected]>

diff --git a/runtime/autoload/dist/man.vim b/runtime/autoload/dist/man.vim
index cd584aa71..6ef47f8b7 100644
--- a/runtime/autoload/dist/man.vim
+++ b/runtime/autoload/dist/man.vim
@@ -3,7 +3,7 @@
 " Maintainer:  Jason Franklin <[email protected]>
 " Maintainer:  SungHyun Nam <[email protected]>
 " Autoload Split: Bram Moolenaar
-" Last Change:         2022 Jun 18
+" Last Change:         2023 Jun 28
 
 let s:cpo_save = &cpo
 set cpo-=C
@@ -180,9 +180,10 @@ func dist#man#PopPage()
     exec "let s:man_tag_buf=s:man_tag_buf_".s:man_tag_depth
     exec "let s:man_tag_lin=s:man_tag_lin_".s:man_tag_depth
     exec "let s:man_tag_col=s:man_tag_col_".s:man_tag_depth
+
     exec s:man_tag_buf."b"
-    exec s:man_tag_lin
-    exec "norm! ".s:man_tag_col."|"
+    call cursor(s:man_tag_lin, s:man_tag_col)
+
     exec "unlet s:man_tag_buf_".s:man_tag_depth
     exec "unlet s:man_tag_lin_".s:man_tag_depth
     exec "unlet s:man_tag_col_".s:man_tag_depth

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qWkKg-006afi-0f%40256bit.org.

Raspunde prin e-mail lui