Open rabidgadfly opened 8 years ago
Same here: Atom 1.9.0, 1.9.1 and 1.9.2 Linux Mint
Has this package been working fine when clicking, up until recently? I don't see any commits from the author since Dec 2015.
Same issue for me. Atom 1.9.4 on Ubuntu 14.04
(it did correctly work on Atom 1.8 before I upgraded to 1.9.4 today)
Fixed on my desktop by commenting the line that threw the error (in ~/.atom/packages/nav-panel/lib/nav-view.coffee): https://github.com/Ziink/atom-nav-panel/blob/master/lib/nav-view.coffee#L270
gotoMarker: (markerId)->
editor = atom.workspace.getActiveTextEditor()
marker = editor.getMarker(markerId)
return unless marker
row = marker.getStartBufferPosition()
#editor.unfoldBufferRow(row)
editor.setCursorBufferPosition(row)
editor.scrollToCursorPosition()
Disclaimer: I really do not know what is the goal of this statement, so maybe this hotfix would make some regression elsewhere...
I think this means if you have a function within a folded one the outer is being unfolded.
sorry...but I don't really know how to create a proper pull-request!? after making the following changes it seems to work for me....also see the reference i found for this
diff --git a/lib/nav-view.coffee b/lib/nav-view.coffee
index b6b341d..fad63a0 100644
--- a/lib/nav-view.coffee
+++ b/lib/nav-view.coffee
@@ -267,7 +267,10 @@ class NavView extends ResizableWidthView
marker = editor.getMarker(markerId)
return unless marker
row = marker.getStartBufferPosition()
- editor.unfoldBufferRow(row)
+ # See https://discuss.atom.io/t/how-to-toggle-current-fold-in-editor-view/11094/5
+ brow = editor.bufferPositionForScreenPosition(editor.getCursorScreenPosition()).row
+ if editor.isFoldedAtBufferRow(brow)
+ editor.unfoldBufferRow(brow)
editor.setCursorBufferPosition(row)
editor.scrollToCursorPosition()
Looks like you got it fixed! Works in Atom 1.9.7 on Mac OS X 10.11.6. Thanks ballinette and armin77.
It fixed the problem for me too.
Atom 1.10.2
I installed https://atom.io/packages/nav-panel-plus which is maintained at https://github.com/0tho/atom-nav-panel-plus and doesn't have this issue.
[Enter steps to reproduce below:]
Atom Version: 1.9.1 System: Mac OS X 10.11.6 Thrown From: nav-panel package, v0.0.11
Stack Trace
Uncaught TypeError: Invalid Point: ((38, 0), 0)
Commands
Config
Installed Packages