Hi all, it’s stupid again.
I have the following code. it is pretty much the same code taken from goto_line.py except for the replace_view command.
The goto variable is an int the plugin computes depending on the content of the view.
self.view.run_command("replace_view", {"newcontent" : content} )
pt = self.view.text_point(goto, 0)
self.view.sel().clear()
self.view.sel().add(sublime.Region(pt))
sublime.active_window().active_view().show_at_center(pt)
Sometimes the view scrolls to the point. Sometimes it doesn’t. It seems it is working randomly, and I cannot figure out why.
The plugin imports and exports text to / from the view and I have flags determining the goto variable.
The only thing I can think of that may be happening is that there is some sort of sublime caching issue or race condition, where potentially the goto line code somehow beats the replacement of content.
I’m all out of ideas, and I got more than a bazzillion print statements… i give up… any thoughts?
Thanks for any and all help