diff options
| author | Malfurious <m@lfurio.us> | 2020-11-01 02:34:44 -0500 |
|---|---|---|
| committer | Matt Hunter <m@lfurio.us> | 2026-01-17 20:01:05 -0500 |
| commit | c81663d47401396e76c31b32b124d41982894a46 (patch) | |
| tree | e85cf1b0c5e75b8caa7ba51c407dc370944006a6 /st.c | |
| parent | 862cdd1f111b0e5b503fcfaf19f8dfeb6bf07486 (diff) | |
| download | st-c81663d47401396e76c31b32b124d41982894a46.tar.gz st-c81663d47401396e76c31b32b124d41982894a46.zip | |
This patch addresses two issues with selections in st.
First, the SelectionClear signal from X is no longer ignored. So, if
another selection is made in another window, st's selection will
disappear.
Second (and this one is more of a personal preference), new selections
that begin after the end of a line are now considered to begin at the
start of the following line. This makes selecting a group of lines
easier for either copy/paste or readability in the terminal. Previously,
the newline character from the preceeding line would be included in the
clipboard and the dead-space at the end of that line would be
highlighted.
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -495,7 +495,10 @@ selnormalize(void) return; i = tlinelen(sel.nb.y); if (i < sel.nb.x) - sel.nb.x = i; + { + sel.nb.x = 0; + sel.nb.y++; + } if (tlinelen(sel.ne.y) <= sel.ne.x) sel.ne.x = term.col - 1; } |
