Text Editor: Use active text selection as search query #115247
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#115247
Loading…
Reference in New Issue
No description provided.
Delete Branch "guishe/blender:quick-search"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Now when using the shortcut/operator to begin search in the
text editor the active text selection is used as search query.
Also previously while using the operator to begin search, the input
field that contains the query was activated, but it was not
properly highlighted as active, now using the shortcut shows
correctly the input field as active.
The text selection is used as search query only if the mouse is
over the main region of the text space and if the selection is in
just one line.
find_set_selected
, does the same thing in some way, but that operator copies the selected text and looks for the next locationPersonally, I am more used to pressing
ctrl + f
and having a search window open with the text I have selected and search the next or previous oneHey, that works really well. I especially like how it properly activates the Find box with text cursor too.
I like that it only puts the selected text into the Find box for single-line selections. This means we could potentially still an option later to search within the selected text only (assuming it is multiline). But this should probably be in a comment, like alter your existing comment to something like "Use active text selection as a search query, if single line" or similar.
There is only one part that feels a bit off, but could be intentional. If I have searched for something earlier, but now the sidebar is closed. I select multiple lines of text, then press Ctrl-F. The sidebar pops out nicely, the Find box is activated, but the last search string is in there. Is the last search string useful in this case or should the search text just be blank?
It also happens without selection, but I don't have a strong opinion about it.
I feel that it can be useful to be able to continue searching what we were already looking for, change the search string only if selection is in a single line.
With search highlight feels better (#115417)
Yes, I'm not sure either. I guess what I worry about is the differing result if you select a portion of a line and press Ctrl-F versus selecting a portion that spans two lines. Having it blank in the latter keeps from not noticing.
Oh that is nice! You have to finish that baby. I can imagine it being a bit different with syntax highlighting on.
@blender-bot build
I guess I also don't have a strong opinion on that. I think we should just put this in as an obvious solution and we can adjust that behavior later if need be.
Love it.
I've been testing and I think it may be a matter of preference.
By the way, is
find_set_selected
is still useful?This operator allows to put multi line text in
find_text
, the search only allow matches in single lines