Comments (7)
OK I just found what the problem is, it happens when the diff somehow has empty lines, probably because of the last part about properties.
Youi just need to replace occurences of "if line[0]" with "if line and line[0]"
from modific.
Thank you for the solution. I will add it to the code ASAP.
from modific.
I could not reproduce this issue, but I made fix for it as you proposed.
Let me know if plugin works now.
from modific.
Thanks, I'll let you know when I get back to office.
Though I remembver I had to change 2 occurences to fix it, and once more to completely get rid of stack traces.
If it does not fix, I'll send you a patch.
Thanks anyways.
from modific.
Tested from office, I still have a backtrace and it fails.
So here is a patch :
--- Modific.py.orig 2013-01-14 11:12:13.000000000 +0100
+++ Modific.py 2013-01-14 11:14:16.000000000 +0100
@@ -312,17 +312,17 @@
deleted = []
for chunk in self.get_chunks():
current = chunk['start']
deleted_line = None
for line in chunk['lines']:
- if line[0] == '-':
+ if line.startswith('-'):
if (not deleted_line or deleted_line not in deleted):
deleted.append(current)
deleted_line = current
- elif line[0] == '+':
+ elif line.startswith('+'):
if deleted_line:
deleted.pop()
deleted_line = None
changed.append(current)
elif current - 1 in changed:
changed.append(current)
Sorry for not bothering to fork and do a pull request, I'm at work and lacking time + git tools...
from modific.
Thanks. I should have been using startswith
instead of line[0]
from modific.
Please, feel free to reopen this issue, if it still occurs.
from modific.
Related Issues (20)
- Modific hides SublimeLint mark HOT 1
- Does not revert indentation correctly HOT 12
- Problems with SublimeLinter HOT 3
- Not working with OSX HOT 9
- [Question] still useful since sublime text adds git support? HOT 2
- SublimeText 4 support HOT 3
- Lockup with Win8.1 HOT 4
- Syntax error HOT 2
- RuntimeError: Must call on main thread... HOT 2
- Issue when setting fallback_encoding to UTF-8 in user settings HOT 3
- Windows/ Sublime Text problems with leftalt/ rightalt and overall ctrl+alt shortcut HOT 1
- Highlight changes on demand
- Feature request: Display removed lines by hotkey HOT 2
- Git show diff not opening new tab HOT 4
- Sometimes no gutter update HOT 2
- if set console_encoding , cause exception. HOT 5
- Stray CR character after replace_modified_part command HOT 24
- Seeks git in /usr/bin/git which triggers an error on my OSX installation HOT 4
- SVN HOT 8
- Incompatiblity with SublimeLinter HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modific.