Skip to content

Commit

Permalink
fix highlight error for current shown buffer (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ron89 authored and severin-lemaignan committed Jul 12, 2016
1 parent a291066 commit e608168
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions autoload/minimap.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ def draw(lengths,indents, startline=0):

minimap.buffer[:] = draw(lengths,indents)
# Highlight the current visible zone
top = round(topline / 4)
bottom = round(bottomline / 4 + 1)
vim.command("match " + highlight_group + " /\%>0v\%<{0}v\%>{1}l\%<{2}l./".format(WIDTH + 1, top, bottom))
top = int(topline / 4)
bottom = int(bottomline / 4 + 1)
vim.command("match {0} /\\%>0v\\%<{1}v\\%>{2}l\\%<{3}l./".format(
highlight_group, WIDTH + 1, top, bottom))

# center the highlighted zone
height = int(vim.eval("winheight(0)"))
Expand Down

0 comments on commit e608168

Please sign in to comment.