Commit Graph

62 Commits

Author SHA1 Message Date
Boris Faure 962c99f3e2
colors: have 4 blocks: normal, bright, faint and bright+faint 2020-11-03 23:31:09 +01:00
Boris Faure 0c25e408d6
termiointernals: add comment about using bright but not bold 2020-10-27 23:52:02 +01:00
Boris Faure 6ff8b36a23
colors: do not use bold/bright and faint/dim at the same time
In that case: use the bold font weight if available and the faint color
2020-10-27 23:52:02 +01:00
Boris Faure 9f2f8464f3
Fix typos
Summary: Fix some typos.

Differential Revision: https://phab.enlightenment.org/D12032
2020-07-05 20:19:59 +02:00
Boris Faure 442ce78874
termiointernals: avoid implicit signedness conversions 2020-06-13 00:13:18 +02:00
Boris Faure 4144170cfc
termiointernals: use a switch/case
and let the compiler do the optimization and unroll the binary search
itself.

I wrote a micro benchmark:
1. switch_fallthrough: 9597502784 ns
2.      switch_return: 8921069697 ns
3.      binary_search: 18403018625 ns

The results are pretty consistent over multiple runs.
1st is switch case with one return at the end and lots of
fallthrough.
2nd is a return of each case,
3rd is the original code.
2020-05-26 23:27:08 +02:00
Boris Faure 745b93e95b
termiointernals: _codepoint_is_wordsep() is const 2020-05-24 18:19:48 +02:00
Boris Faure abdef9786c
have define BINARY_TYFUZZ/BINARY_TYTEST 2020-05-24 18:05:39 +02:00
Boris Faure 392bfdb4a7
tests: rework tytest.c/tyfuzz.c to no longer #include one in the other 2020-05-23 11:59:24 +02:00
Boris Faure 29cce7e73e
termiointernals.c: do not consider '-' as a word separator 2020-05-18 16:24:51 +02:00
Boris Faure 3be858b09b
termiointernals: handle EM (end of medium) as word separator 2020-05-11 23:22:58 +02:00
Boris Faure 144db18649
termiointernals: no timer in tests 2020-05-05 21:51:40 +02:00
Boris Faure 38e4935427
termiointernals: skip invisible codepoints when assessing whether they changed 2020-05-05 21:51:40 +02:00
Boris Faure f679d28809
termiointernals: speed up selection scroll in tests + also in real life 2020-05-05 21:51:40 +02:00
Boris Faure 3be01d8b8b
meson: add tytest.{c,h} to improve testing with ENABLE_TEST_UI 2020-05-05 21:51:40 +02:00
Boris Faure 0b48853597
reduce scope of variables 2020-04-17 23:09:07 +02:00
Boris Faure 3172c2cf30
Revert "pleasing cppcheck?"
This reverts commit a848b0262f.
2020-04-17 22:02:09 +02:00
Boris Faure a848b0262f
pleasing cppcheck? 2020-04-17 00:01:32 +02:00
Boris Faure d5d61a5b76
termio: hide links when content change underneath 2020-04-16 23:43:21 +02:00
Boris Faure cfbbe60164
Merge branch 'terminology-1.6' 2019-12-05 19:59:44 +01:00
Boris Faure a782ce61e2
test return of ty_sb_add(). Closes CID1408482 2019-12-05 19:08:05 +01:00
Boris Faure cf80e70faf
backlog: move related functions to that file 2019-11-24 16:12:26 +01:00
Boris Faure e197c04f65 termiointernals: be able to select tabs + test 2019-10-27 16:14:28 +01:00
Boris Faure 7dcb9e4e43 termio_selection_get(): simplify by using macros 2019-10-27 12:06:18 +01:00
Carsten Haitzler eb5b39c261 selection in backbuffer fix try #2
get rid of segv's by trying this again in a different way

@fix
2019-08-26 17:41:22 +01:00
Carsten Haitzler 295e72c41f Revert "selections - live within scrollback bounds per line"
This reverts commit 5ccf988abf.
2019-08-26 17:09:08 +01:00
Carsten Haitzler 5ccf988abf selections - live within scrollback bounds per line
dont access out of range on scrollback lines
@fix

there is still an issue of the selection just being in the wrong place
when selecting from the backlog lines as opposed to on-screen lines. i
see the start/end selection points being... weird. but this at least
stops crashes.
2019-08-20 18:16:37 +01:00
Boris Faure 7f4d891610 termiointernals: no out-of-band read when selecting empty lines 2019-07-10 23:14:53 +02:00
Boris Faure dff54aeca2 termiointernals: remove leak 2019-07-08 23:02:41 +02:00
Boris Faure 1ce26c51f7 termiointernals: fix regression on selecting word at start of line
In case of double-click.
2019-03-21 22:18:07 +01:00
Boris Faure 9785beaef0 termiointernals: fix possible NULL-dereference. CID1399748 2019-03-18 23:05:06 +01:00
Boris Faure 8076e4673f termiointernals: fix possible NULL-dereference CID1399745 2019-03-18 22:56:49 +01:00
Boris Faure 674a87287d termiointernals: fix reporting mouse move with no button pressed + tests 2019-03-05 21:20:50 +01:00
Boris Faure 93a25e6123 termiointernals: report alt on mouse move + tests 2019-03-04 23:39:57 +01:00
Boris Faure 61a56ae029 termiointernals: handle mouse wheel with alt + tests 2019-03-04 23:05:40 +01:00
Boris Faure 8bc4c030c3 termiointernals: handle mouse wheel on normal mode after pos 94 2019-03-03 19:40:19 +01:00
Boris Faure acee5d2d67 it's possible to use alt with mouse wheel 2019-03-03 19:26:45 +01:00
Boris Faure bc45dba7c9 termiointernals: after x:94, no more reporting in normal mode 2019-03-03 19:25:56 +01:00
Boris Faure 69e8255d25 termiointernals: cleanup 2019-03-03 18:36:09 +01:00
Boris Faure b9542183e6 termiointernals: handle meta & MOUSE_X10 in mouse_down 2019-03-03 18:35:27 +01:00
Boris Faure 72ff9cbe3c termiointernals: mouse wheel is not reported in X10 mode 2019-03-03 15:47:37 +01:00
Boris Faure 5a98842d63 termiointernals: do not emit mouse wheel on mode X10 2019-03-03 13:20:03 +01:00
Boris Faure 4d89080d71 termiointernal: handle empty celles in selections.
Condition was wrong
2019-02-27 20:23:41 +01:00
Boris Faure 5300a89013 termiointernals: fix segfault 2019-02-25 22:51:03 +01:00
Boris Faure 1e5825832f termiointernals: rewrite _sel_word_to() + update tests 2019-02-25 22:02:11 +01:00
Boris Faure 52a0ba46e0 termiointernals: selection is based on relative y, not on-screen y 2019-02-23 17:56:25 +01:00
Boris Faure bebb0872c3 termiointernals: remove empty selections 2019-02-23 13:34:31 +01:00
Boris Faure 5fedd2c0a4 termiointernals: unset selection when codepoint is different
but do not make a difference between space and no codepoint
2019-02-23 11:12:14 +01:00
Boris Faure 510032df70 termiointernals: fix leak in termio_internal_get_selection() 2019-02-22 20:15:16 +01:00
Boris Faure 4bc04c5421 termiointernals: be able to mock mouse wheel 2019-02-19 20:03:14 +01:00