Age | Commit message (Collapse) | Author |
|
|
|
|
|
The only remaining clients of this API are specific to bitmap fonts and
editing thereof.
|
|
Strings include ASCII, UTF-8, and UTF-16
Co-authored-by: Andreas Krohn <hamburger1984@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
Specifically, the ones HexEditor::did_complete_action possibly raised in
case creating an undo stack entry or pushing it onto the undo stack
fails. In this case, an error popup is displayed and the modifications
are undone.
This removes 2 FIXMEs inside the code :^)
|
|
|
|
|
|
Returning a `bool` is meaningless, so let's make it more expresive :^)
|
|
`HexEditor::set_readonly` was never called, even though
`HexEditor::is_readonly` was occasionally queried -- so it's entirely
been removed.
|
|
|
|
|
|
|
|
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules
"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
|
|
Closes: #11925
|
|
|
|
To support editing of large files it is an advantage to not load the
entire file into memory but only load whatever is needed for display at
the moment. To make it work, file access is abstracted into a socalled
HexDocument, of which there two: a memory based and a file based one.
The former can be used for newly created documents, the latter for file
based editing.
Hex documents now do track changes instead of the HexEditor. HexEditor
only sets new values. This frees HexEditor of some responsibility.
|
|
There are a lot of numbers just floating around in the code.
Give them proper names.
|
|
File positions as well as selection positions should be size_t,
as they are never negative and can become quite big.
|
|
For better visibility of wether the editing focus is on the hex or the
ascii view, render a blinking caret instead of a solid cell background.
For that to work, it's also necessary to change the way selection works.
The selection shouldn't extend to the current position but up to the
byte before it.
|
|
|
|
Most of the code here is based off the implementation of how
TextEditor uses FileSystemAccessClient.
|
|
find_and_highlight() selected +1 too many bytes.
'Select All' selected +1 too many bytes past the end of
the buffer.
Status bar 'Selected Bytes' count was off by -1 when more
than zero bytes were selected.
|
|
|
|
|
|
|
|
|
|
|
|
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
|
|
Added search submenu with options to find or find again.
Find allows to search for ASII string or sequence of Hex value.
|
|
This API was a mostly gratuitous deviation from POSIX that gave up some
portability in exchange for avoiding the occasional strlen().
I don't think that was actually achieving anything valuable, so let's
just chill out and have the same open() API as everyone else. :^)
|
|
|