How to always keep cursor visible?

Kate 25.12.1 (FreeBSD) here.

I seem unable to find the option something “Always keep cursor visible”.

This option was necessary to keep Kate work the traditional way. It just took care that the cursor is always in the visible window, never outside.

Issue is, it is pretty common when having searched for a spot in large source files, one then wants to examine its surroundings.

But! If one forgets to click the mouse in the window, then pressing a scroll key puts you BANG back where the cursor was before starting searching.

This is super annoying and disruptive - so, what needs to be set to make sure the cursor always stays in the visible window area?

what are you doing exactly to cause this jump to happen?

i cannot reproduce it, scrolling allays takes place from the last found match, using either the find or the search features.

What I do is always the same pattern:

^F search bar pops up

entering search term: as I do this the view jumps to the according next occurrences of the search term. Sometimes the cursor moves as it should when browsing the document using F3/shift-F3.

But this does not always go this way. Often the cursor does not follow the search, it stays where it was when pressing ^F, which makes necessary to click into the particular window to make the cursor stay at the location found via F3. Less often the search happens in a different split window than where it originated (e.g. where the cursor was when doing ^F). Then I have to abort the search using ESC, and try anew (which then works most of times).

So I am not even sure whether this is normal (intended) behavior or a bug. I have to mention that I am working with 20+ source files spread over 3x3 or more split windows, some containing the same file, just at different positions, so this is a quite complex configuration with about a megabyte of source (e.g. code, resources etc)

what version of kate are you using?

trying to reproduce your slit window behavior on Version 23.08.5 is proving fruitless.

i opened a large file in kate, then added a vertical split.

Find feature

^F opens the search bar on the newly opened split view and the cursor follows the search using F3

when i click back the original view, there is no search bar because i have not used ^F on that window yet, but when i do… the cursor follows that search and F3 works as it should in that view.

switching back to the split view and using shift F3 takes back one instance of the open search term in that view.

it all seems to be working as expected as long as you realize the each spit view has it’s own ^F search box and that they work independently.

Search feature

search works differently and independently of find

not only does search act upon both views at the same time, but you can still use F3 to move the cursor between your previous find terms in each window, even after closing the find tool.

random thought

also i use focus follows mouse if that has anything to do with it.

Does the “Autocentre cursor” option (Editing/Text navigation) help at all?

pinging off that, there is another setting about page up/dn moving the cursor that i have turned off.

when i turn that on it adds another level of “where did my cursor go” to the mix, so perhaps that is messing with you, op.