Mercurial > vim
comparison src/testdir/test_cursor_func.vim @ 18000:7a19c8d6bb9e v8.1.1996
patch 8.1.1996: more functions can be used as methods
Commit: https://github.com/vim/vim/commit/aad222c9c9a1e4fe6ae5a1fe95bb084619be0e65
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 6 22:46:09 2019 +0200
patch 8.1.1996: more functions can be used as methods
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 06 Sep 2019 23:00:03 +0200 |
parents | 0dcc2ee838dd |
children | 11dca9732a48 |
comparison
equal
deleted
inserted
replaced
17999:9fd4d58b3e5b | 18000:7a19c8d6bb9e |
---|---|
35 endfunc | 35 endfunc |
36 | 36 |
37 " Very short version of what matchparen does. | 37 " Very short version of what matchparen does. |
38 function s:Highlight_Matching_Pair() | 38 function s:Highlight_Matching_Pair() |
39 let save_cursor = getcurpos() | 39 let save_cursor = getcurpos() |
40 call setpos('.', save_cursor) | 40 eval save_cursor->setpos('.') |
41 endfunc | 41 endfunc |
42 | 42 |
43 func Test_curswant_with_autocommand() | 43 func Test_curswant_with_autocommand() |
44 new | 44 new |
45 call setline(1, ['func()', '{', '}', '----']) | 45 call setline(1, ['func()', '{', '}', '----']) |