Age | Commit message (Collapse) | Author |
|
While the existing behavior worked as intended,
it wasn't possible to have two views on the same file at different
locations.
Since there isn't much use in having two views open at the same location
allow one view to be at a different scroll location.
UI edit-source and selecting a text data block now need explicit calls
to scroll to the cursor location.
Resolves T87284
|
|
|
|
Remove 'U.wheellinescroll' preference, currently hidden and unused.
Differential Revision: https://developer.blender.org/D9616
Reviewed by Brecht Van Lommel
|
|
Simplify and sanitize handling of usercounts for Text IDs generated
trhough `BKE_text_load_ex`.
|
|
|
|
|
|
`WM_operator_properties_filesel()` allows C operators to set a display or sort
type for the File Browser to use. But the File Browser would always override
that because of an invalid `_is_set()` check. (The operators don't actually set
the value, they only set the property's default value.)
The only operator affected by this is "Recover Auto Save". It is supposed to
show a vertical list ordered chronologically. It used settings from the
previous File Browser usage before this patch.
Operators using the File Browser should generally use
`FILE_DEFAULTDISPLAY`/`FILE_SORT_DEFAULT` now, except if they have a reason not
to. See comments at their definition.
----
This makes it so operators that set a different display or sort type
don't change the sort or display type for the next File Browser operation.
So using "Recover Auto Save" entirely isolates display and sort type from other
operations.
Differential Revision: https://developer.blender.org/D8598
Reviewed by: Bastien Montagne
|
|
Add poll function for read-only text data,
for operators that don't require the text to be editable.
|
|
Now the behaviors are consistent for blend, image and text files:
- If the file is not writable, will report it.
- If the file is new (without a path), save as will be used.
- If the file was deleted, will try to recreate it.
Ref D6755
|
|
Approximately 141 changes of capitalization to conform to MLA title style.
Differential Revision: https://developer.blender.org/D8392
Reviewed by Julian Eisel
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
|
|
This commit renames 'execute' to 'run' because:
- This follows Python's "PyRun" which these functions wrap.
- Execution functions can use either exec/eval modes,
making naming awkward (for future API refactoring).
|
|
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/space_text` module.
No functional changes.
|
|
|
|
D8032 by @Poulpator with minor edits
|
|
Also update/correct some of the comments.
|
|
Using 'name' for the full path of a file reads badly,
especially when id.name is used in related code.
|
|
Address confusion from T78114.
|
|
This is really doing two operation so using the ampersand makes more
sense.
Also selection sounds better than selected.
This also adjusts the name in the text Edit menu which was an issue
raised in T68738
|
|
|
|
This reverts commit 9af0cdcd9349b6c0fd1cc0e57a58254e21e1bd3b.
Removed this feature because of confusion
caused by incorrect description.
|
|
|
|
|
|
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
|
|
Avoid accessing inline since it's often used multiple times.
In some cases it was already defined.
|
|
`invoke_props_dialog` and `invoke_popup` had a width and a height field. The height field was ignored as the height is determined based on the content. This change removes the field from the BPY + WM_api
Reviewed By: Campbell Barton, Jacques Lucke
Differential Revision: https://developer.blender.org/D6694
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
Scrolling a short text buffer could show the cursor offset.
|
|
Also use more descriptive names.
|
|
This was meant to set the selection end instead of the cursor
however it hasn't been working for years and seems quite obscure.
|
|
|
|
Add smooth scrolling support for vertical scrolling.
This is only active while scrolling so we don't need to support
pixel-level offsets for operators, interactions.
|
|
Only indent when there aren't characters before the cursor.
This resolves the conflict with Ctrl-Space for view maximize.
D6239 by @wbrbr for text editor, based console support on this.
|
|
Also remove unused vars.
|
|
Various small changes to Text Editor, mostly to do with scaling, alignment, and theme support.
Differential Revision: https://developer.blender.org/D6268
Reviewed by Campbell Barton
|
|
Differential Revision: https://developer.blender.org/D5736
|
|
Differential Revision: https://developer.blender.org/D5847
|
|
|
|
D5451 by @Poulpator with fixes.
|
|
There isn't anything specific to text data with these functions.
|
|
This allows users to map comment/un-comment to be mapped to keys.
|
|
|
|
|
|
Text datablocks should always have a 'single user' flag set, and they
usually do not have any user (since neither text editor itself, nor
Freestyle usage are text users - the second is odd btw...), the only one
am aware of is the script node (e.g. for OSL).
Add text case was simply not doing anything, so added.
Load text case was doing things in inversed logic (setting user count to
zero in BKE, then setting 'real user' flag in ED code). Made it the
other way around (BKE ID creation code should not care about usercount
usually, this is up to higher-level code to decide what to do
(operators, RNA...).
Note: tried to check all cases, but there might very well be some more
hidden bugs here...
|
|
Applying/undoing incremental changes didn't fit well when
mixed with periodic snapshots from mem-file undo.
This moves to a much simpler undo system.
- Uses array storage with de-duplication from `BLI_array_store`.
- Loads the buffer into existing text data,
for better performance on large files.
- Has the advantage that Python operators can be supported
since we don't depend on hard coded undo operations.
Solves T67045, T66695, T65909.
|
|
No functional changes (currently unused).
|
|
Operator flags to wrap on a single axis.
D4865 by @Gvgeo with updates.
Resolves T64585
|
|
Most code uses ReportList argument last (or at least not first)
when an optional report list can be passed in.
|