Commits

Anonymous committed 526e0e9

Fixed a bug: sometimes got wrong color when deleting and replacing lines

  • Participants
  • Parent commits 0da1557

Comments (0)

Files changed (3)

File complexity.py

 
 def update_line_markers(line_changes):
     for line, complexity in line_changes.iteritems():
+        vim.command(':sign unplace %i' % line)
         vim.command(':sign place %i line=%i name=%s file=%s' %
                     (line, line, complexity, vim.eval('expand("%:p")')))#}}}
 

File complexity.vim

 
 def update_line_markers(line_changes):
     for line, complexity in line_changes.iteritems():
+        vim.command(':sign unplace %i' % line)
         vim.command(':sign place %i line=%i name=%s file=%s' %
                     (line, line, complexity, vim.eval('expand("%:p")')))#}}}
 

File tests/manual/test_update_function.py

+def foo():
+    x if x else x if x else x if x else x if x else x if x else x if x else x
+    # Delete this line, then save. The function should go from yellow to
+    # green. Then undo and save. The *whole thing* should go back to yellow.
+    x if x else x
+    pass
+    pass
+    pass
+