On Fri, 1 Aug 2003 at 06:33:50 -0700, Mikol Graves wrote:
> I have the same complaint. I expect the caret to be placed where I
> click with the mouse regardless of where the keyboard focus lies.
OK, I see the problem now. The pathological behavior you guys are
talking about only occurs if the final destination is not on the same
page (so to speak) as the starting point of the search.
> On a similar note I often find myself using my mouse scroll wheel to
> locate a particular "page" in my buffer. When I get close (and become
> less casual about my search), I start to use Up, Down, Page Up or Page
> Down from the keyboard. But the cursor is pages (sometimes very many
> pages) away in one direction or the other, and using the keyboard
> navigational keys causes my view to jump back to the vicinity of the
> Perhaps it would make sense to leave the cursor in place while
> scrolling with the mouse scroll wheel until the current line reaches
> the top (while scrolling down) or bottom (while scrolling up) of the
> viewport. When the current line does reach the top or bottom it should
> stick. This is, for example, what Micrsoft Word does (for Page up and
> Page Down only, and with no particular visual indication, but that
> shouldn't limit J's behavior).
I'm willing to change j's behavior so it works this way.
To spell it out:
1. Clicking in the text area will always force the caret to the
location of the click.
2. Scrolling with the mouse, whether via mousewheel, or via clicks
in the scrollbar itself, or via the scrollbar arrow buttons,
will leave the caret in its original place until that place
scrolls off the screen. If the place scrolls off going upwards,
the caret will then stay on the top line of the screen; if the
place scrolls off going downwards, the caret will stay on the
bottom line of the screen.
3. Page up/down work correctly as things stand (I think); the caret
stays in the same relative place on the screen on the new page.
The current incremental search mouse click behavior is simply a bug. I
don't think I've ever tried to terminate an incremental search with a
mouse click, myself, so it's possible I just never saw it.
Note that the scrolling change (item 2) is really a fairly significant
change in j's behavior, and the new behavior will be at least somewhat
at odds with "standard" editor behavior, if there is such a thing.
But I find the current behavior annoying, too.