Mercurial > vim
annotate runtime/ftplugin/diff.vim @ 34028:bcf1429cb1fc v9.0.2188
patch 9.0.2188: cursor wrong after { in single line buffer
Commit: https://github.com/vim/vim/commit/9e6549d2fb282c45a2492ea95fe7ba54c2082c3e
Author: Gary Johnson <garyjohn@spocom.com>
Date: Wed Dec 27 19:12:43 2023 +0100
patch 9.0.2188: cursor wrong after { in single line buffer
Problem: cursor wrong after { in single line buffer
(Edwin Chan)
Solution: do not place the cursor at the end for a single
line buffer when moving backwards
(Gary Johnson)
closes: #13780
closes: #13783
Signed-off-by: Gary Johnson <garyjohn@spocom.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 27 Dec 2023 19:30:03 +0100 |
parents | 4027cefc2aab |
children | 8ae680be2a51 |
rev | line source |
---|---|
446 | 1 " Vim filetype plugin file |
2 " Language: Diff | |
32770
4027cefc2aab
Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents:
26148
diff
changeset
|
3 " Maintainer: The Vim Project <https://github.com/vim/vim> |
4027cefc2aab
Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents:
26148
diff
changeset
|
4 " Last Change: 2023 Aug 10 |
4027cefc2aab
Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents:
26148
diff
changeset
|
5 " Former Maintainer: Bram Moolenaar <Bram@vim.org> |
446 | 6 |
7 " Only do this when not done yet for this buffer | |
8 if exists("b:did_ftplugin") | |
9 finish | |
10 endif | |
11 let b:did_ftplugin = 1 | |
12 | |
26148 | 13 let b:undo_ftplugin = "setl modeline< commentstring<" |
446 | 14 |
15 " Don't use modelines in a diff, they apply to the diffed file | |
16 setlocal nomodeline | |
21499 | 17 |
18 " If there are comments they start with # | |
26148 | 19 let &l:commentstring = "# %s" |
20 | |
21 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") | |
22 let b:browsefilter = "Diff Files (*.diff)\t*.diff\nPatch Files (*.patch)\t*.h\nAll Files (*.*)\t*.*\n" | |
23 let b:undo_ftplugin ..= " | unlet! b:browsefilter" | |
24 endif |