Skip to content

Commit

Permalink
Add patch to fix statusbar indentation mode display
Browse files Browse the repository at this point in the history
  • Loading branch information
randstr committed Oct 4, 2016
1 parent eaadd9e commit 2110718
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions contrib/fix-statusbar-indentation.patch
@@ -0,0 +1,15 @@
diff -upr a/core/ui.lua b/core/ui.lua
--- a/core/ui.lua 2016-10-04 05:13:24.706406020 +0100
+++ b/core/ui.lua 2016-10-04 05:21:50.639733299 +0100
@@ -348,8 +348,9 @@ events_connect(events.UPDATE_UI, functio
local col = buffer.column[pos] + 1
local lexer = buffer:private_lexer_call(GETLEXERLANGUAGE):match('^[^/]+')
local eol = buffer.eol_mode == buffer.EOL_CRLF and _L['CRLF'] or _L['LF']
- local tabs = string.format('%s %d', buffer.use_tabs and _L['Tabs:'] or
- _L['Spaces:'], buffer.tab_width)
+ local indent = buffer.indent ~= 0 and buffer.indent or buffer.tab_width
+ local tabs = string.format('%s %d[%d]', buffer.use_tabs and _L['Tabs:'] or
+ _L['Spaces:'], indent, buffer.tab_width)
local enc = buffer.encoding or ''
local text = not CURSES and '%s %d/%d %s %d %s %s %s %s' or
'%s %d/%d %s %d %s %s %s %s'

0 comments on commit 2110718

Please sign in to comment.