summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibVT/TerminalWidget.cpp
AgeCommit message (Collapse)Author
2021-09-02LibVT: Execute DragOperation after resetting active hyperlinkMusab Kılıç
2021-08-26Terminal+LibVT: Use LibConfig instead of Core::ConfigFileAndreas Kling
2021-07-27LibGUI: Add a ClipboardClient for GUI::ClipboardTheFightingCatfish
Anyone who inherits from `GUI::Clipboard::ClipboardClient` will receive clipboard notifications via `clipboard_content_did_change()`. Update ClipboardHistoryModel, TextEditor and TerminalWidget to inherit from this class.
2021-07-21LibGfx: Use "try_" prefix for static factory functionsAndreas Kling
Also mark them as [[nodiscard]].
2021-07-19Everywhere: Use AK/Math.h if applicableHendiadyoin1
AK's version should see better inlining behaviors, than the LibM one. We avoid mixed usage for now though. Also clean up some stale math includes and improper floatingpoint usage.
2021-06-30AK+Everywhere: Add and use static APIs for LexicalPathMax Wipfli
The LexicalPath instance methods dirname(), basename(), title() and extension() will be changed to return StringView const& in a further commit. Due to this, users creating temporary LexicalPath objects just to call one of those getters will recieve a StringView const& pointing to a possible freed buffer. To avoid this, static methods for those APIs have been added, which will return a String by value to avoid those problems. All cases where temporary LexicalPath objects have been used as described above haven been changed to use the static APIs.
2021-06-29LibVT: Paste full path when dropping file on widgetXavier Defrang
Prioritize URLs over plain text content in order to insert absolute path instead of basename
2021-06-23LibVT: Keep track of the 'true' line endingsAli Mohammad Pur
2021-06-23LibVT: Don't crash when clicking outside of the terminal's buffer areaGunnar Beutner
When resizing a terminal window the number of columns may change. Previously we assumed that this also affects lines which were in the terminal's buffer while that is not necessarily true.
2021-06-10Kernel+LibVT: Fix selection with scrollback wrap-aroundDaniel Bertalan
If lines are removed from the tail of the scrollback buffer, the previous line indices will refer to different lines; therefore we need to offset them.
2021-06-04LibVT: Fix underlines incorrectly rendering in redDaniel Bertalan
Previously, `href` attributes weren't checked for not being empty when drawing their underlines. This caused any underline to be treated as an active `href`, hence the red color.
2021-06-04LibVT: Implement bright color supportDaniel Bertalan
Previously, we only used bright colors when the bold attribute was set. We now have the option to set it via escape sequences. We also needed to make the bold text behavior optional, as some color schemes do weird things with it. For example, Solarized uses it for various shades of gray, so bold green would turn into a light shade of gray. The following new escape sequences are supported: - `CSI 90;m` to `CSI 97;m`: set bright foreground color - `CSI 100;m` to `CSI 107;m`: set bright background color
2021-06-04LibVT+Terminal: Add color scheme supportDaniel Bertalan
This commit introduces color scheme support to Terminal. These are found in `/res/terminal_colors` and the default color scheme can be set in `~/.config/Terminal.ini`. Furthermore, a combo box is added for setting the color scheme at runtime. The previously used default color scheme has been added to `/res/terminal-colors/Default.ini`. To make the implementation more compatible with other color schemes, `TerminalWidget` now supports overriding the default foreground and background colors.
2021-06-04LibVT+Kernel: Create `Color` classDaniel Bertalan
Previously, we converted colors to their RGB values immediately when they were set. This meant that their semantic meaning was lost, we could not tell a precise RGB value apart from a named/indexed color. The new way of storing colors will allow us to retain this information, so we can change a color scheme on the fly, and previously emitted text will also be affected.
2021-05-24LibVT: Implement Bracketed Paste ModeDaniel Bertalan
This mode allow us to escape any data that was not directly typed by the user. `vim` currently uses this. If we implement it in the shell, we could prevent newlines from being injected into the shell by pasting text or dragging files into it (see #7276).
2021-05-24LibVT+Kernel: Add support for setting cursor stylesDaniel Bertalan
This commit introduces support for 3 new escape sequences: 1. Stop blinking cursor mode 2. `DECTCEM` mode (enable/disable cursor) 3. `DECSCUSR` (set cursor style) `TerminalWidget` now supports the following cursor types: block, underline and vertical bar. Each of these can blink or be steady. `VirtualConsole` ignores these (just as we were doing before).
2021-05-22LibVT: Don't cache bold variant of VT font in a member variableAndreas Kling
Remove some leftovers from back when we had to resolve a bold variant of the terminal font manually. Now we can just use bold_variant().
2021-05-21Applications: Use titlecase and distinct underlined characters in menusMax Wipfli
This changes (context) menus across the system to conform to titlecase capitalization and to not underline the same character twice (for accessing actions with Alt).
2021-05-20LibGfx: Remove Gfx::FontDatabase::default_bold_fixed_width_font()Andreas Kling
Ask for a bold_variant() of the default_fixed_width_font() instead.
2021-04-29Everywhere: "file name" => "filename"Andreas Kling
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
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 *
2021-04-13Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"Andreas Kling
I hereby declare these to be full nouns that we don't split, neither by space, nor by underscore: - Breadcrumbbar - Coolbar - Menubar - Progressbar - Scrollbar - Statusbar - Taskbar - Toolbar This patch makes everything consistent by replacing every other variant of these with the proper one. :^)
2021-04-10LibVT: Update TerminalWidget after double-click selectionAndreas Kling
Previously we had to wait for the cursor to blink before we actually got to see what got selected from double-clicking.
2021-04-09Terminal+LibVT: Add Alt shortcuts to menu actionsAndreas Kling
2021-03-11Everywhere: Rename "logo" key to "super" keyAndreas Kling
This seems to be the most common way to refer to this key, so let's call it what people actually call it.
2021-02-27LibVT: Put TerminalWidget in the VT namespace :^)Andreas Kling
2021-02-27LibVT: Make VT::Line use a Vector for storageAndreas Kling
This is preparation for non-destructive terminal resizing which will require more dynamic storage for lines.
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-21LibVT: Avoid double relayout during interactive resizeAndreas Kling
Don't fire the on_terminal_size hook while we're in relayout. This fixes the terminal window flopping around during interactive resizing. (It was mostly noticeable if something else was hogging the CPU at the same time.)
2021-02-21LibVT: Don't paint selection with opacityLinus Groh
Fixes #5442.
2021-02-20Terminal+LibVT: Resize Terminal app window when requested by VTAndreas Kling
This will allow us to react to things like DECCOLM.
2021-02-15LibVT: Clean up TerminalWidget a bit, removing unused cruftAndreas Kling
2021-01-25Everywhere: Remove unnecessary debug comments.asynts
It would be tempting to uncomment these statements, but that won't work with the new changes. This was done with the following commands: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/#define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/#define/ { toggle = 1 }' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/ #define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/ #define/ { toggle = 1 }' {} \;
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling