akahuku / wasavi

wasavi is an extension for Chrome, Firefox, and Opera. wasavi changes a textarea element to virtual vi editor which supports almost all the vi/ex commands.
http://appsweets.net/wasavi/
Other
1.51k stars 66 forks source link

"Uncaught RangeError: rowNodes: argument row (X) out of range" on ctrl+v →G #194

Open lamby opened 6 years ago

lamby commented 6 years ago

Hi,

I can often crash wasavi with "ctrl+v →G". ie. I'm trying to select the current line down to the bottom of the file (in order that I can delete it).

I get:

wasavi.js:4976 sequence point with an error: Failed to execute 'replaceChild' on 'Node': parameter 2 is not of type 'Node'.
TypeError: Failed to execute 'replaceChild' on 'Node': parameter 2 is not of type 'Node'.
    at Buffer.emphasisBound (chrome-extension://dgogifpkoilgiofhhhodbodcfgomelhe/frontend/wasavi.js:999:23)
    at setBound (chrome-extension://dgogifpkoilgiofhhhodbodcfgomelhe/frontend/wasavi.js:3075:9)
    at extendBound (chrome-extension://dgogifpkoilgiofhhhodbodcfgomelhe/frontend/wasavi.js:2562:10)
    at chrome-extension://dgogifpkoilgiofhhhodbodcfgomelhe/frontend/wasavi.js:2107:4
    at Generator.next (<anonymous>)
    at run (chrome-extension://dgogifpkoilgiofhhhodbodcfgomelhe/frontend/utils.js:593:20)
    at next (chrome-extension://dgogifpkoilgiofhhhodbodcfgomelhe/frontend/utils.js:584:4)
    at Promise (chrome-extension://dgogifpkoilgiofhhhodbodcfgomelhe/frontend/utils.js:616:3)
    at new Promise (<anonymous>)
    at g.execGenerator (chrome-extension://dgogifpkoilgiofhhhodbodcfgomelhe/frontend/utils.js:582:9)
promise.then.error @ wasavi.js:4976
classes.js:2156 Uncaught RangeError: rowNodes: argument row (7) out of range
    at Buffer.rowNodes (classes.js:2156)
    at Buffer.rows (classes.js:2171)
    at Buffer.getGraphemeClusters (classes.js:2398)
    at locate (classes_ui.js:379)
    at CommandCursor.lostFocus (classes_ui.js:453)
    at Wasavi.CursorUI.update (classes_ui.js:625)
    at handleWindowBlur (wasavi.js:4829)

Alas it doesn't seem to happen everytime, but if I keep trying it will crash and I will lose my data. :(

lamby commented 5 years ago

Gentle ping on this? Might even consider offering a bounty...