Currently, "icon_current" is just for the modifying line.
Is it possible to make the "icon_current" for the changes that is not saved (and the "icon_scope" is for saved changes)?
singw wrote:Currently, "icon_current" is just for the modifying line.
Is it possible to make the "icon_current" for the changes that is not saved (and the "icon_scope" is for saved changes)?
agibsonsw wrote:singw wrote:Currently, "icon_current" is just for the modifying line.
Is it possible to make the "icon_current" for the changes that is not saved (and the "icon_scope" is for saved changes)?
Hello. Are you referring to saving of the file? That is, you would like two sets of colour - one colour for saved changes?
If so, it would be possible - although I would prefer to use three colours (scopes). I would still want the current edit-region to be differently-coloured, as it is central to the whole algorithm.
I'll await your clarification. Andy.
agibsonsw wrote:@singw
Mmm this is quite a detour from the original purpose of my plug-in; heading towards a Diff-tool or versioning system.
It would require maintaining two sets of regions, being able to combine them when needed, but still keep them distinct. It would also mean that every time a line is edited, the two regions are erased and recreated from scratch (this is how ST-regions work).
I shall think about this some more but, for the moment, I'll leave the plug-in as it is and concentrate on fixing any niggles, minor changes, etc.. Soz, Andy.
I don't quite understand what it means. Isn't the plugin change the icon when the edit position change now?
def on_pre_save(self, view):
_ = adjustEdits(view)
saved_edits = view.get_regions("edited_rgns")
newview = sublime.active_window().new_file()
edit = newview.begin_edit()
for i, r in enumerate(sorted(saved_edits)):
editline, _ = view.rowcol(r.begin())
newview.insert(edit, newview.size(), "\n-----\nLine: " + str(editline) + '\n')
newview.insert(edit, newview.size(), view.substr(r))
newview.end_edit(edit)"saved_scope": "keyword",
// whether to outline saved edit-regions
"saved_edits": true,
// whether to create a summary of edits on save
"output_edits": falseReturn to Plugin Announcements
Users browsing this forum: No registered users and 4 guests