Preedits on linux can often contain more than one character.
Also changes the painting from white on black to painting with
just an underline.
Change-Id: I6769217ca80cf131aa3fb96b20e23b717f591467
Reviewed-by: David Schulz <david.schulz@qt.io>
ShortCutMap::addShortCut did assert if the keysequence was empty.
Changed Q_ASSERT to QTC_ASSERT to not crash.
Change-Id: Ib03e21bb00ab989e00d5c3de68b52b84c6eb2360
Reviewed-by: David Schulz <david.schulz@qt.io>
We copied QShortCutMap into Qtc to allow us tight control over which shortcuts
are "enabled" while the focus is inside a terminal, and the keyboard is "locked"
to the Terminal. Locked here means that except for a select few, all key presses
are send directly to the terminal and cannot be used to activate other actions.
Change-Id: I96cddf753033c0f4e7d806b20085bb4755853117
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Especially on Linux the pointer value of the Terminal might be reused,
leading to warnings about actions being registered for the same context.
Cleaning up the registration fixes this.
Change-Id: Ie1d53bf79581e9f98576e7a4e70420ec63da0f86
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
Change-Id: I5d57843eba79f0eb023ea7e3c4149aa515430189
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
When moving the mouse left or right out of the viewport
the selection would grow into the previous/next line
without the bounding.
Change-Id: Ica38eac3b306338ef24aa4abace66f110edb2aef
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Under some font sizes the cursor size and cell size were not correctly
aligned on the pixel grid, leaving behind artifacts of prior draws.
Change-Id: I25e6efdc44102f24672912e1e56c31be0c686b89
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Calling Aggregate::remove is not necessary and led to a warning message.
Change-Id: I51cdd7bfa9bdda7a3ebedf6a86e48fe54fd8f3ef
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Previously urls such as http://google.com were appended to the current
dir, as FilePath::isAbsolute would return false since there is no path.
Change-Id: I17546aed322a74f6b8cbcc166d37608fd809fd1e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Show link if control key is pressed (without mouse move)
* Copy link on Control+Shift+Click
* Add Copy Link Action to Right click menu
Change-Id: Ide4ff4e77c03e015117c67f09c9d60dedd14dfcb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
On non windows systems, initialize it with "-l" to start a login shell.
Change-Id: I972f845c3933c6a54752d4c71108a658311a0256
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Adds new search widget to terminal
* Adds new theme color "TerminalFindMatch"
* Fixes ESC key handling in terminal
Fixes: QTCREATORBUG-28946
Change-Id: I7b6057d13902a94a6bcd41dde6cc8ba8418cd585
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This allows us to easily update the view when the colors are changed
in the settings.
Change-Id: I0b4f150b4fc9cec9aee2796d63f2395e05ce70df
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Adds a new helper app "process_stub" that replaces the previous.
"process_stub_unix/win". The purpose was and is to allow processes
to be "injected" into other hosts apps like terminals while still
being able to control and debug them.
A new base class called "TerminalInterface" is used for both the new
Terminal plugin and the legacy TerminalProcess implementation.
Fixes: QTCREATORBUG-16364
Change-Id: If21273fe53ad545d1a768c17c83db4bf2fd85395
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Make Pty::Data optional. When set, the PtyProcessImpl
implementation is implied.
Change-Id: I7990e9d9016223e6597d876a5d0c4ed177365874
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
The multi line selection from bottom right corner to top left was broken
for copy to clipboard.
Change-Id: Ica40ec2ce5bb7b9d4b0187ebb454cd16e039e339
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Previously all lines would be copied into one without lines breaks.
Change-Id: Id87dbde84a19ccbc5f53438a305173d1b070eaba
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Selections were invisible if a cell with a background color
was selected.
Changes to the terminal did not reliably reset the selection.
Change-Id: I923223f43e5ee1b6576966f9dd791aa109ac1d5f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
When "altscreen" is enabled ( e.g. when starting nano ), the terminal
switches into an alternate mode without scrollback buffer.
This was not correctly handled where the scrollback buffer would stay
active.
Change-Id: I443d26383d9cd908befcd24a837ecf84c0c1e849
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
The rendering has been rewritten to use cached GlyphRuns instead
of text layouts. The VTerm specific code was moved into
TerminalSurface.
Change-Id: I10caa3db4ee932414987c9ddae2dcb777dc1f6e7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
QTextLayout ignores trailing spaces, and does not draw their
background color. Converting them to Nbsp fixes this.
Change-Id: I19a363bcb4792c613eb9c59f7caaa40fa631b937
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Previously m_selection was not correctly ordered such that start < end.
This patch fixes that and also adds optional debug visualizations to aid
in debugging / validating the selection.
Change-Id: I9b0d2fcd917f39eeb5082bc374796fed91521c7c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
The copy action should only be enabled once a selection exists.
In the beginning no selection can exist, therefore the copy action
is disabled.
Previously this lead to a bug where only the second "Enter" keypress
was passed on to the terminal.
Change-Id: Iac01c273f70a50a4fc131bd6a2bbb1507705b853
Reviewed-by: Cristian Adam <cristian.adam@qt.io>