Closed despairblue closed 5 years ago
@t9md love your packages!
I get this almost every time I move between different files, possibly after searching in files and jumping to a new file? Happy to help debug this if you want to point me where to look.
You can enable cursor history debug, by following command.
Then observe developer console, which show history table on each jump.
Maybe setting small history number on max
config would be also helpful.
It seems to be adding entries when I click or move inside the find in files (project-find) dialog. Then if I close the dialog, then try to go back or forward to those entries, I trigger the error.
The lines marked with a - are the ones from the project-find boxes
5: (0, 0), config.jl
6: (0, 0), -
7: (300, 24), es.py
8: (0, 16), -
9: (0, 0), -
> 10:
Same story for the regular find-and-replace pane
@t9md presumably you'd want to put a condition around https://github.com/t9md/atom-cursor-history/blob/fb521cb9ac2460212dc5657de8052168f2b31c43/lib/history.js#L200
maybe checking for newEntry.URI
being falsy, it seems to be undefined in the entries from the find panes
Spent several minutes trying to reproduce issue, but I couldn't reproduce the issue. Fix maybe super easy, but I first want to understand steps to reproduce and have clear understanding of the cause.
Thanks for taking the time to take a look, sorry you weren't able to reproduce from the above:
Mac OS Atom 1.34.0 atom-cursor-history 0.13.1
1) click somewhere in a file
# cursor-history: moved enough [mousedown]
0: (0, 0), history.js
1: (201, 7), history.js
> 2:
2) cmd-f (keyboard shortcut for toggle find-replace pane) 3) click in replace field with mouse
# cursor-history: focus lost [mousedown]
0: (0, 0), history.js
1: (201, 7), history.js
2: (0, 0), -
> 3:
4) click back into file
# cursor-history: moved enough [mousedown]
0: (0, 0), history.js
1: (201, 7), history.js
2: (0, 0), -
3: (193, 18), history.js
> 4:
5) type shortcut for move back in history
That should give you the stack trace.
I've fixed the issue locally by adding
if(newEntry.URI){
this.entries.push(newEntry)
}
Which stops the blank url entries from the file pane from appearing in the list.
Thanks for your help and for your great packages, particularly vim-mode-plus which is brilliant.
OK, I could finally reproduce it! Thank you, I've already tried same procedure but couldn't reproduce.
The difference is I set searchAllPanes: false
. I could reproduce after I changed it to false
(it's default).
I'll check why and fix it thanks!
[Enter steps to reproduce:]
Not sure how that happens, yet.
Atom: 1.19.1 x64 Electron: 1.6.9 OS: Mac OS X 10.12.5 Thrown From: cursor-history package 0.12.0
Stack Trace
Uncaught Error: no pane found for [object Object]
Commands
Non-Core Packages