Solved Qt Creator Editor Highlighted selection box?
-
Hi all, Great forum, a very simple question for those that know.
When editing code I sometimes get a boxed selected area of text that limits the scope of find and/or replace. It is similar to the folded box but covers several lines.
Question how did I cause the box and how do I get rid of it?
I have tried the docs, google etc. but not knowing what it is called, it is hard to search for.
My work round is to save and close file then re-open.
My guess is I am doing some strange mouse/keyboard combination that selects a limited search area. It tends to happen on laptops, so it may be a mouse shortcut/gesture type event. (These old hands have typed too many curly brackets)
Happens on both Linux(Debian and Ubuntu) and Windows (8 and 10).
Thanks in advance.
-
Can you take a picture of it and show it here?
My guesses are:
- you enable box selection (Alt + Shift + Arrow keys)
- you have enabled inline rename feature (Ctrl + Shift + R)
- you have enabled search (Ctrl + F)
- you have enabled vim mode (Alt + V)
- you have folded a block (just click on the
{ ... }
to unfold it)
But it's hard to say which exactly (or maybe something else entirely).
-
Thanks for suggestions, I will post a picture when it happens again.
I am currently on windows VNCed to linux and (Alt shift arrow) is grabbed by "IT" locked down laptop. I'll try it when I am near a pure linux box. -
My mistake, it is LXDE Linux desktop grabbing (alt shift arrow).
I have discovered alt shift mouse for column select, useful.
So still looking for possibilities.
-
Finally I have a screen grab
What is this selection box and how do I create it and close it? -
Oh, that thing. I have seen it a few times, but I don't know how to enable/ disable it, sorry.
-
@Focaldepth
By "the selection box" do you mean the "rectangle" (kind of :) ) around those four lines? That is shown because it is the scope of your Find/Replace in the pane in the middle showing that. Close that pane, or change the selection area, if that's what you want. -
@JonB Yes exactly.
Thank you, closing the search pane does reset it.
As I use VNC a lot, I assume that partial key codes go missing and I enter a limited scope find/replace mode.
I would still like to know how to make it happen and how to turn it off and how to change the search scope.
Thanks again I now have a work around.
-
@Focaldepth said in Qt Creator Editor Highlighted selection box?:
I would still like to know how to make it happen and how to turn it off and how to change the search scope.
When you start a search --- you are about to type Ctrl+F --- it depends on whether you currently have anything selected/highlighted/show in blue:
-
If you have nothing selected, there is no limited scope for the Find (it's file-wide), you don't get a "rectangle".
-
If you do have something selected, that will be the scope for the Find, you will get the "rectangle", your Find/Replace will be limited to that area.
Which should be about what you would expect?
-
-
@JonB Yes Thanks again, I guess it could be what I would have expected. Or not?
Anyway thanks for the simple answer to my simple problem.
So if I have some select text, somewhere in the document (from yesterday) I then CTL-F then that selected range is locked in until I close the search pane or un-selet the text and CTL-F again.
I have been very confused about this for a long time. You have now explained every thing.
I hope this helps some one else a daft as me in the future.
I will mark this as solved/closed.
-
@Focaldepth said in Qt Creator Editor Highlighted selection box?:
So if I have some select text, somewhere in the document (from yesterday) I then CTL-F then that selected range is locked in until I close the search pane or un-selet the text and CTL-F again.
Yep :)