Commit Graph

465 Commits

Author SHA1 Message Date
Christoph Lohmann d743b93fda This is a shorter bit handling in MODE_MOUSE. 2013-06-01 13:17:20 +02:00
Christoph Lohmann 317b785921 Add some comments about the other mouse reporting modes. 2013-06-01 13:13:01 +02:00
Christoph Lohmann 405fd89ac1 Implementing mouse focus and all events. 2013-06-01 13:06:53 +02:00
Christoph Lohmann 8315dc4179 Fixing bad highlighting on first SNAP_WORD multiline select. 2013-06-01 12:23:55 +02:00
Christoph Lohmann b5144100a5 Fixing the selection in a single line again.
Thanks p37sitdu@lavabit.com!
2013-05-26 16:10:22 +02:00
Christoph Lohmann 8f1bef0502 Fixing the selection scrolling and the selection naming.
Thanks p37sitdu@lavabit.com!
2013-05-26 13:07:26 +02:00
Christoph Lohmann 8f47c4a4de Lazy font unloading too. 2013-05-11 21:59:55 +02:00
Christoph Lohmann 62502a88e9 Lazy fontset loading.
Thanks Johannes Hofmann <Johannes.Hofmann@gmx.de>!
2013-05-11 08:54:26 +02:00
Christoph Lohmann 678eff6e18 Removing an old select() regression. 2013-05-06 19:50:14 +02:00
Christoph Lohmann 8e968739c3 Allow more complex delimiters for word selections.
Thanks Alexander Rezinsky <alexrez@gmail.com>!
2013-05-04 19:04:20 +02:00
Christoph Lohmann 0c2b513d01 Expand the last line with '\n' in case of overselection.
Thanks Alexander Rezinsky <alexrez@gmail.com>!
2013-05-04 19:00:32 +02:00
Christoph Lohmann 634c247fa7 Select to the end of row if end of line is reached.
Thanks Alexander Rezinsky <alexrez@gmail.com>!
2013-05-04 08:05:11 +02:00
Christoph Lohmann 5938fa9d32 Better comments for the snapping code. 2013-05-04 08:01:17 +02:00
Christoph Lohmann 8618386de9 More stable blinking. 2013-05-01 13:14:46 +02:00
Christoph Lohmann 911ba5674b Selection snapping is now considering wrapping.
Thanks Alexander Rezinsky <alexrez@gmail.com> for mentioning this!
2013-04-28 18:14:15 +02:00
Christoph Lohmann a53017c8b4 Add a possibility to modify the string sent by mouse buttons.
Thanks Alexander Rezinsky <alexrez@gmail.com> for the suggestion!
2013-04-28 17:42:30 +02:00
Christoph Lohmann a77b01176a Be more efficient in blinking. 2013-04-26 18:55:40 +02:00
Christoph Lohmann 1e09726518 Enable blinking in st. 2013-04-26 18:41:54 +02:00
Christoph Lohmann 1b2751f5c2 Fixing the selection handling to allow one char selection.
Thanks Alexander Sedov <alex0player@gmail.com> for suggesting the fix!
2013-04-25 06:28:11 +02:00
Christoph Lohmann 0851f2be2a Fixing the selection issue in altscreens. 2013-04-24 21:30:59 +02:00
Alexander Sedov 011c0f9e5b Removed redundant check in draw code.
We're now clearing empty areas with spaces, so there is no point to check
if character contains non-empty string.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-04-24 21:27:56 +02:00
Roberto E. Vargas Caballero 048c54fd5b Fix selecting clearing and BCE
The commit b78c5085f7 changed the st behaviour enabling BCE capability,
that means erase regions using background color. Problem comes when you
clear a region with a selection, because in this case the real mode of the
Glyph is not the value of term.line[y][x], due in drawregion we had enabled
the ATTR_REVERSE bit.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-04-23 20:36:30 +02:00
Christoph Lohmann 6b03bb769a Now clipping is more clear. 2013-04-23 19:37:28 +02:00
Christoph Lohmann db6f796ecf Removing the overdrawing of some fonts. 2013-04-23 19:17:50 +02:00
Christoph Lohmann 2bd6afd1c9 Implementing 8 bit mode for meta. 2013-04-23 15:22:14 +02:00
Christoph Lohmann b596d6ba3c Adding wrap handling in selection. 2013-04-21 13:01:16 +02:00
Alexander Sedov 872a7f18ea Added support for double/triple click+dragging.
Now double-click+dragging automatically snaps both ends to word boundaries
(unless on series of spaces), and triple-click selects whole lines.
As a side effect, snapping now occurs on button press, not button release
like it previously was, but I hope that won't be inconvenient for anyone.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-04-20 15:54:19 +02:00
Alexander Sedov e5ff746430 Selection now handles empty lines less counter-intuitively.
Now, when you are selecting a region, you will get all empty lines that happen
to be in it, including trailing ones. Last line terminator is omitted as it previously
was, though.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-04-18 16:51:52 +02:00
Christoph Lohmann da182612b7 Removing trailing whitespace. 2013-04-18 06:51:18 +02:00
Alexander Sedov b7e6a5c825 Got rid of redundant Glyph state.
Now, newly allocated Glyphs are set to spaces and current cursor colors
with tclearregion() routine.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-04-18 06:48:06 +02:00
Christoph Lohmann 3ae0299064 Removing unneeded comments. 2013-04-18 06:41:54 +02:00
Alexander Sedov fed9968ba5 Got rid of code duplication in tnew() and tresize().
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-04-18 06:39:43 +02:00
Alexander Sedov 0ca0dd8b11 Strip trailing spaces from lines when copying selection.
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-04-14 21:32:53 +02:00
Christoph Lohmann c371fe58a3 Enable BCE everywhere. 2013-04-14 18:30:10 +02:00
Christoph Lohmann 44db38a5f8 Fix the geometry handling. 2013-04-13 15:24:26 +02:00
Christoph Lohmann de4cd2f6af Resize now uses xclear(). 2013-04-13 09:49:11 +02:00
Christoph Lohmann 1e7816c202 Drawing a more visible rectangle as cursor on unfocus.
To have a more visible cursor on unfocused windows this patch makes st draw a
rectangle around the terminal cell.

Thanks Mark Hills <mark@xwax.org> for the suggestion!
2013-04-13 09:44:00 +02:00
Christoph Lohmann 5dc48af29e Patching while not really woken up. 2013-04-13 08:51:30 +02:00
Christoph Lohmann 5984657c00 Minor naming issue fixed. 2013-04-13 08:50:38 +02:00
Christoph Lohmann 4018b2c507 Making the copy and pasting consistent.
The copying and pasting in the terminald and GUI world is flawed. Due to the
discussion on the mailinglist it seems that sending '\n' is what GUIs expect
and '\r' what terminal applications want. St now implements that behaviour.
2013-04-13 08:48:17 +02:00
Christoph Lohmann 684cf55a0d Make st work with a plain -e command. 2013-04-10 17:48:32 +02:00
Christoph Lohmann b1813b14d9 Adopting arg.h with more flexible cmd handling. 2013-04-03 21:00:38 +02:00
Christoph Lohmann 580c8bbd46 Add an option to disable alternative screens. 2013-04-03 20:42:27 +02:00
Christoph Lohmann 7e7760c2ed Add the possibility to have default highlight colors.
Thanks to stargrave@stargrave.org for the suggestion!
2013-03-29 19:01:24 +01:00
Christoph Lohmann a1e3b94b37 Removing an undefined case. just do regular selections. 2013-03-29 18:39:01 +01:00
Christoph Lohmann 4b17dddb10 Making rectangular selection work again.
People sending me patches against strange revisions and basing on their own
revisions make me having to reapply them. Then such errors appear.

Thanks Alexander Sedov <alex0player@gmail.com> for noticing this.
2013-03-20 21:19:28 +01:00
Christoph Lohmann 55adf0aad1 Pange seems to use ascent + descent instead of height.
Thanks Bobby Powers <bobbypowers@gmail.com> for noticing this!
2013-03-10 21:16:51 +01:00
Christoph Lohmann c6b89f23e7 Using strsep and fixing null termination in csiparse.
Thanks for the hint from Alexander Sedov <alex0player@gmail.com>!
2013-02-26 21:43:40 +01:00
Christoph Lohmann 1c1621da69 Changing the way how paste is handled, just for the nano people. 2013-02-26 19:08:51 +01:00
Christoph Lohmann 1aa26b4ecd Fixing a bug while parsing empty arguments in csiparse. 2013-02-26 19:07:23 +01:00
Christoph Lohmann 7d32471eff Fixing bugs in the strtol and strtok_r replacements.
Thanks "Roberto E. Vargas Caballero" <k0ga@shike2.com> for the comments!
2013-02-26 18:19:44 +01:00
Christoph Lohmann 7cb0d95509 Using strtok_r for the string parsing. 2013-02-25 13:36:40 +01:00
Christoph Lohmann 37863356b0 Using strtol with overflow checking. 2013-02-25 13:23:56 +01:00
Christoph Lohmann be7c6d7fb0 Add insert for the primary clipboard to MOD + Shift + Ins.
Thanks Mantas Mikulėnas <grawity@gmail.com> for the patch!
2013-02-23 21:50:13 +01:00
Christoph Lohmann e40d8da194 Removing dbe and introducing umlauts to titles.
Thanks Alexander Sedov <alex0player@gmail.com> for the title patch!
2013-02-23 21:44:06 +01:00
Christoph Lohmann efaf1c2a94 Add umlaut support for title change.
Thanks Alexander Sedov <alex0player@gmail.com>!
2013-02-23 21:20:21 +01:00
Christoph Lohmann 1b6c6535c1 Replace parse_int with atoi(). 2013-02-23 21:17:25 +01:00
Alexander Sedov 800800a3bb Added basic xterm-ish palette swap support.
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-02-19 19:12:42 +01:00
Christoph Lohmann 3865e9eaaf Implement rectangular mouse selection.
Thanks Alexander Sedov <alex0player@gmail.com>!
2013-02-19 19:08:41 +01:00
joe9 e5295629cd ensure that the italic font has the same weight as the normal font
The specified font[] pattern need not have a medium weight. It could be
specified as a number too or have a different weight other than medium.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-02-19 16:09:05 +01:00
Christoph Lohmann 0e738c3d72 Style inquisition. 2013-02-19 16:04:54 +01:00
Christoph Lohmann 7f297e297c Fixing the reverse mode of st colors.
Thanks Alexander Sedov <alex0player@gmail.com> for finding this!
2013-02-19 15:51:25 +01:00
Christoph Lohmann f4a6c20f46 Adding a way to ignore bits in the state. 2013-02-16 13:57:12 +01:00
Christoph Lohmann e0ec2cf984 Style inquisition. 2013-02-15 19:36:20 +01:00
Christoph Lohmann 086cd61511 Doing it like the new run() was proposed. 2013-02-15 19:30:43 +01:00
Christoph Lohmann 95033753be Adding a more efficient drawing code.
Thanks Mihail Zenkov <mihail.zenkov@gmail.com> for giving the hint!
2013-02-15 19:10:22 +01:00
Christoph Lohmann b7261c84aa Tmux wants this to be mutually exclusive.
Thanks Egmont Koblinger <egmont@gmail.com> for noticing this!
2013-02-15 17:45:38 +01:00
Christoph Lohmann 05a1ff03e9 Adding mor explict font patterns. 2013-02-13 21:35:27 +01:00
Christoph Lohmann eeffbe11ab Making st not activate the cursor in case of Mod + k in dwm.
Thanks Jens Nyberg <jens.nyberg@gmail.com>!
2013-02-11 22:20:16 +01:00
Christoph Lohmann 8a9475a0dd Setting the surrounding border to defaultbg.
Thanks Stephen Caraher <moskvax@gmail.com>!
2013-02-10 16:36:03 +01:00
Christoph Lohmann ce3efa9e9b Removing some debug messages. 2013-02-08 20:24:26 +01:00
Christoph Lohmann efd04ccad6 Fixing the menus in mc. 2013-01-27 17:48:01 +01:00
Christoph Lohmann 26c101b706 Fixing the black remaining lines in mc and dialog.
This also applies some style fixes and handles some old blink codes.
2013-01-27 13:26:06 +01:00
Christoph Lohmann 384fabdb5b Adding extended mouse reporting in st.
Thanks Egmont Koblinger <egmont@gmail.com>!
2013-01-26 15:13:56 +01:00
Christoph Lohmann deb720af7f Removing the debug messages again. 2013-01-20 17:13:48 +01:00
Christoph Lohmann 57f39defaf Fixing the clipboard copying to st itself. 2013-01-20 17:12:41 +01:00
Christoph Lohmann 3036051fb1 St is in 2013 now. 2013-01-20 15:12:45 +01:00
Christoph Lohmann b78c5085f7 Implementing Back Color Erase (BCE). 2013-01-20 14:54:35 +01:00
Christoph Lohmann b4b513c791 Make line drawing work again. 2013-01-19 18:38:28 +01:00
Christoph Lohmann 15c2bff9fa Yes, xft should be on the buffer. Thanks Mihail Zenkov. 2013-01-19 15:49:34 +01:00
Christoph Lohmann c7b033b8f0 Trying out the double buffering without dbe. 2013-01-19 15:00:16 +01:00
Christoph Lohmann 0e232a4115 Dbe is not required anymore. 2013-01-19 09:13:52 +01:00
Christoph Lohmann ed90afb743 The title can now be set with UTF-8 characters.
Thanks Mihail Zenkov <mihail.zenkov@gmail.com>!
2013-01-18 19:11:25 +01:00
Christoph Lohmann 1827e0643f Standout mode has changed. Thanks p37sitdu@lavabit.com! 2013-01-08 20:36:49 +01:00
Christoph Lohmann b3326ab63b A different double buffering strategy so the background is default set. 2013-01-08 20:09:33 +01:00
Christoph Lohmann b233007e0f Damn, my fault. The cache should have at least some entries. 2013-01-05 20:56:58 +01:00
Christoph Lohmann c772a6e571 Applying the changes to the docs; by Peter Hartman. 2013-01-05 20:30:25 +01:00
Christoph Lohmann 4e14a4a97f A fix for the XopenIM() errors. 2013-01-01 13:15:43 +01:00
Christoph Lohmann c99db5b017 Increasing font cache for speeding up UTF8 demos. 2012-12-30 17:35:41 +01:00
Christoph Lohmann 44e1b79abf Removing the warning about extents. 2012-12-30 17:35:15 +01:00
Christoph Lohmann 08e06ef079 Fixing the font unloading in case of zoom. 2012-12-29 16:24:33 +01:00
Christoph Lohmann addc848345 Speeding up the drawing, then all characters are known. 2012-12-29 15:03:03 +01:00
Christoph Lohmann 9c44229c62 Adding fallback support to st. 2012-12-28 23:52:04 +01:00
Christoph Lohmann 082bab29f3 Fixing a compile error. 2012-12-22 19:50:02 +01:00
Christoph Lohmann ac4c6da4ef Fixing a off-by-one error in the penultimate row drawing. 2012-12-22 13:39:27 +01:00
Christoph Lohmann 4d37763ee7 Fixing a precedence problem. Thanks tridactyla! 2012-12-18 13:00:00 +01:00
Christoph Lohmann fc2b366968 Checking for the lower X11 special keys too. Thanks Benjamin R. Haskell! 2012-12-13 20:57:15 +01:00
Christoph Lohmann 3c6ec1995d Adding error checks for XCreateIC and XOpenIM. 2012-12-11 08:32:08 +01:00
Christoph Lohmann 2696f81875 Be careful about mar77i's patches. 2012-12-10 23:02:58 +01:00
Christoph Lohmann 78215c8ee0 Fixing the nasty selection bug. Thanks p37sitdu@lavabit.com! 2012-12-10 20:45:46 +01:00