- Code: Select all
self.view.replace(edit, replaceRegion, formatted)
An annoying side effect is that this causes the cursor to be at position 0 on the first line and the buffer view scrolls all the way to the top. Whats my best option for getting the line/position of the cursor prior to calling the replacement, and then resetting the cursor position to position 0 of that line after the replacement occurs (and have that in the field of view obviously)?
I'm either blind, or there isnt anything obvious in the API. Thanks in advance