Created
August 28, 2021 18:15
-
-
Save haxpor/b57fee25bf6a7c7f56be78993f5c3953 to your computer and use it in GitHub Desktop.
patch for vim lightline (at bb0b401) be fix its non-updated col when use vim script to get function name https://vim.fandom.com/wiki/Show_what_function_the_cursor_is_in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/autoload/lightline.vim b/autoload/lightline.vim | |
index 2076a11..6aab48f 100644 | |
--- a/autoload/lightline.vim | |
+++ b/autoload/lightline.vim | |
@@ -106,7 +106,7 @@ let s:_lightline = { | |
\ 'paste': '%{&paste?"PASTE":""}', 'readonly': '%R', 'charvalue': '%b', 'charvaluehex': '%B', | |
\ 'spell': '%{&spell?&spelllang:""}', 'fileencoding': '%{&fenc!=#""?&fenc:&enc}', 'fileformat': '%{&ff}', | |
\ 'filetype': '%{&ft!=#""?&ft:"no ft"}', 'percent': '%3p%%', 'percentwin': '%P', | |
- \ 'lineinfo': '%3l:%-2v', 'line': '%l', 'column': '%c', 'close': '%999X X ', 'winnr': '%{winnr()}' | |
+ \ 'lineinfo': '%3l:%-2{col(".")}', 'line': '%l', 'column': '%c', 'close': '%999X X ', 'winnr': '%{winnr()}' | |
\ }, | |
\ 'component_visible_condition': { | |
\ 'modified': '&modified||!&modifiable', 'readonly': '&readonly', 'paste': '&paste', 'spell': '&spell' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment