winterTTr / ace-jump-mode

a quick cursor jump mode for emacs
https://github.com/winterTTr/ace-jump-mode/wiki
609 stars 72 forks source link

Only allow candidates which are visible #11

Closed gvol closed 12 years ago

gvol commented 12 years ago

I often use folding to hide large parts of my buffers. This means that I can have hundreds of lines on screen, though only a few of them are actually visible. Thus most of the matches were invisible. To me this seems like a bad idea, so I allow disabling jumping to invisible text. However, I was a little afraid that some people might want it to work the way it currently does, so I created a variable and defaulted it to the current behavior.

winterTTr commented 12 years ago

I am not always use much of invisible lines, so I do not notice this problem yet. I think your patch is the correct way for ace jump, cause if those lines are invisible , finally, all the ace jump marks cannot be seen in those position, either. So we should not make invisible position to be a candidate.

I will merge your patch, as well, I also prefer to make ace-jump-allow-invisible to be nil as default. I will do that in another commit.

Thanks gvol. :-)

gvol commented 12 years ago

Perfect, thanks!