Age | Commit message (Collapse) | Author |
|
|
|
(And use this internally when scrolling to bottom on non-modifier
keydown events.)
|
|
This regressed when turning the terminal history into a circular buffer
as only the non-const version of Terminal::line() was updated with
the new indexing logic.
|
|
Not sure why I put this into LibGUI in the first place.
|
|
Every widget now has a GUI::FocusPolicy that determines how it can
receive focus:
- NoFocus: The widget is not focusable (default)
- TabFocus: The widget can be focused using the tab key.
- ClickFocus: The widget can be focused by clicking on it.
- StrongFocus: Both of the above.
For widgets that have a focus proxy, getting/setting the focus policy
will affect the proxy instead.
|
|
|
|
The qualified name of a font is "<Family> <Size> <Weight>". You can
get the QN of a Font via the Font::qualified_name() API, and you can
get any system font by QN from the GUI::FontDatabase. :^)
|
|
Mostly in comments, but sprintf() now prints "August" instead of
"Auguest" so that's something.
|
|
|
|
|
|
xterms send a bitmask (+ 1) in the 2nd CSI parameter if "special"
keys (arrow keys, pgup/down, etc) are sent with modifiers held down.
Serenity's Terminal used to send ^[[O, which is a nonexistent
escape sequence and a misread of VT100's ^[O (ie the '[' is
replaced by 'O'). Since the xterm scheme also supports shift
and alt modifiers, switch to that.
More flexible, and makes ctrl-left/right and alt-left/right work
in SerenityOS's bash port.
Also do this for page up/down.
No behavior change for SerenityOS's Shell.
|
|
Else, we store an empty but allocated string for each Attribute after a
href was emitted (since it's ended by a non-null empty string), which
makes Line objects very expensive to destroy and to modify.
Reduces `disasm /bin/id` from 414ms to 380ms (min-of-5). There's
a lot more perf wins to be had with better href handling (most
lines don't have any hrefs, so instead of storing a string per
Attr, maybe we could have a vector of hrefs per line and int offsets
into that in each Attr for example), but this is a simple, obvious,
and effective improvement, so let's start with this.
|
|
..and implement this using the new widget override cursor mechanism.
|
|
Let's just say each window has a cursor, there's not really overriding
going on.
|
|
This enum existed both in LibGUI and WindowServer which was silly and
error-prone.
|
|
This makes Terminal::scroll_up() O(1) instead of O(n) in the
size of the history. (It's still O(n) in the size of visible
lines.)
Reduces time to run `disasm /bin/id` with the default terminal
window size from 530ms to 409ms (min-of-5) on my system.
|
|
|
|
To open up for putting not just text/plain content on the clipboard,
let's make the GUI::Clipboard API a bit more raw-data-friendly. :^)
|
|
|
|
|
|
Drops the '16' suffix from filenames. Resizes inconsistent
audio-volume icons to intended size.
|
|
These kept annoying me, because these were the only two lines in the default
boot log that went unattributed.
|
|
This patch adds GUI::FocusEvent which has a GUI::FocusSource.
The focus source is one of three things:
- Programmatic
- Mouse
- Keyboard
This allows receivers of focus events to implement different behaviors
depending on how they receive/lose focus.
|
|
This time, without trailing 's'. Ran:
git grep -l 'codepoint' | xargs sed -ie 's/codepoint/code_point/g
|
|
This reverts commit ea9ac3155d1774f13ac4e9a96605c0e85a8f299e.
It replaced "codepoint" with "code_points", not "code_point".
|
|
Unicode calls them "code points" so let's follow their style.
|
|
|
|
|
|
Sometimes you just want to get rid of all your scrollback history in
the terminal, and now there's a way to do that.
|
|
|
|
|
|
During app teardown, the Application object may be destroyed before
something else, and so having Application::the() return a reference was
obscuring the truth about its lifetime.
This patch makes the API more honest by returning a pointer. While
this makes call sites look a bit more sketchy, do note that the global
Application pointer only becomes null during app teardown.
|
|
This feels so much better than scrolling one line at a time. :^)
|
|
The scroll length is the number of lines by which the terminal will go
up/down when scrolling the mouse wheel once.
|
|
Fixes #2621
|
|
Replace KeyEvent text attribute usage with code_point.
|
|
Get rid of the weird old signature:
- int StringType::to_int(bool& ok) const
And replace it with sensible new signature:
- Optional<int> StringType::to_int() const
|
|
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much
better visual clue about what type of metric is being used.
|
|
You can now request an update of the terminal's window progress by
sending this escape sequence:
<esc>]9;<value>;<max_value>;<escape><backslash>
I'm sure we can find many interesting uses for this! :^)
|
|
This causes the kernel to return EOF, which in turn confuses everything. This is
a regression from the LibVT port of VirtualConsole.
|
|
This will let us share it between the userspace (TerminalWidget) and the Kernel.
|
|
And move canonicalized_path() to a static method on LexicalPath.
This is to make it clear that FileSystemPath/canonicalized_path() only
perform *lexical* canonicalization.
|
|
Now we can pick which application gets opened in the context menu for
URLs in the Terminal \o/
|
|
|
|
TerminalWidget can now handle keydown events that contain multi-byte
UTF-8 sequences. :^)
|
|
|
|
To conserve memory, we now use byte storage for terminal lines until we
encounter a non-ASCII codepoint. At that point, we transparently switch
to UTF-32 storage for that one line.
|
|
|
|
Instead of relying on the GUI code to handle UTF-8, we now process
and parse the incoming data into 32-bit codepoints ourselves.
This means that you can now show emojis in the terminal and they will
only take up one character cell each. :^)
|
|
|