aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
* | config: don't pass -1 to mbstowcs(), silences linker(?) warningDaniel Eklöf2020-08-22-2/+4
|/ | | | | | | | | | | | 'n' _is_ ignored when 'dest' is NULL, but you can still get the following warning: In function ‘mbstowcs’, inlined from ‘parse_section_scrollback’ at ../config.c:429:26: /usr/include/bits/stdlib.h:129:10: warning: ‘__mbstowcs_alias’ specified size 18446744073709551612 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] 129 | return __mbstowcs_alias (__dst, __src, __len); To silence this warning, pass 0 instead, since it is ignored anyway.
* ci: sr.ht: run a codespell task at the endDaniel Eklöf2020-08-22-0/+5
|
* ci: gitlab: install pipDaniel Eklöf2020-08-22-0/+1
|
* ci: gitlab: the package is called 'python3', not 'python'Daniel Eklöf2020-08-22-1/+1
|
* ci: gitlab: pip install codespellDaniel Eklöf2020-08-22-1/+2
| | | | Alpine has no codespell package
* ci: gitlab: run codespell in the 'build' stageDaniel Eklöf2020-08-22-2/+1
| | | | This makes it run in parallel with the compilation steps
* ci: gitlab: run a codespell stage on all *.c and *.h filesDaniel Eklöf2020-08-22-0/+8
|
* Merge branch 'dont-emit-newlines-when-copying-empty-cells' into masterDaniel Eklöf2020-08-21-5/+13
|\ | | | | | | Closes #97
| * extract: only emit newlines if followed by non-empty cellsDaniel Eklöf2020-08-20-5/+13
|/ | | | Closes #97
* Merge branch 'no-async-unwind' into masterDaniel Eklöf2020-08-19-1/+3
|\
| * meson: use "-fno-asynchronous-unwind-tables" for non-debug buildsCraig Barnes2020-08-19-1/+3
|/ | | | | | | This removes the DWARF stack unwinding tables, which shrinks the ".eh_frame" and ".eh_frame_hdr" sections by about 24KiB. Stack unwinding tables are pretty useless to a C program compiled in release mode.
* Merge branch 'selection-exclude-trailing-empty-cells' into masterDaniel Eklöf2020-08-19-11/+56
|\
| * changelog: trailing empty cells are not highlighted in mouse selectionsDaniel Eklöf2020-08-18-0/+1
| |
| * selection: don't highlight trailing empty cells in a selectionDaniel Eklöf2020-08-18-11/+55
| | | | | | | | | | This makes it clear which cells contain spaces (that will be copied) or are empty (will *not* be copied).
* | Merge branch 'update-grid-on-default-fg-bg-change' into masterDaniel Eklöf2020-08-19-47/+65
|\ \ | | | | | | | | | Closes #94
| * | osc: dirty grids on *all* color modifying sequencesDaniel Eklöf2020-08-18-47/+65
| | | | | | | | | | | | | | | | | | | | | We only updated the grid for OSC 4 - Set color <idx>. But we did *not* do it for 104 (reset color <idx>), 10 - set default foreground, 11 - set default background, 110 - reset default foreground, or 111 - reset default background.
* | | Merge branch 'fallthrough' into masterDaniel Eklöf2020-08-19-2/+2
|\ \ \
| * | | csi: add 2 missing "break" statements in csi_dispatch()Craig Barnes2020-08-18-2/+2
|/ / /
* | | csi: xtrestore: add 'default' caseDaniel Eklöf2020-08-18-0/+2
| | | | | | | | | | | | | | | Don't call decset_decrst() with an unhandled parameter (and with 'enabled' uninitialized!)
* | | csi: xtrestore: add missing breakDaniel Eklöf2020-08-18-1/+1
| |/ |/|
* | Merge branch 'xtsave-xtrestore' into masterDaniel Eklöf2020-08-18-312/+341
|\ \ | |/ |/| | | Closes #91
| * csi: xtsave/xtrestore: implement \E[?12s and \E[?12rDaniel Eklöf2020-08-18-3/+19
| | | | | | | | I.e. save/restore cursor-blink state.
| * csi: decset/decrst: only clear mouse tracking/reporting if mode matchesDaniel Eklöf2020-08-18-9/+24
| | | | | | | | | | | | | | | | E.g. only set mouse reporting to NONE, if mouse reporting mode is SGR and an DECRST SGR is issued. Do *not* reset the mouse mode if e.g. mouse reporting mode is SGR and an DECRST URXVT is issued.
| * changelog: xtsave/xtrestoreDaniel Eklöf2020-08-16-0/+2
| |
| * csi: implement XTRESTOREDaniel Eklöf2020-08-16-16/+34
| |
| * term: xtsave: store state in a bitfieldDaniel Eklöf2020-08-16-20/+20
| | | | | | | | | | These shouldn't be accessed in any performance critical paths, so lets save some memory and use a bitfield.
| * csi: xtsave: store modes' SET state, not the current stateDaniel Eklöf2020-08-16-22/+25
| |
| * csi: implement CSI ? Pm s - XTSAVEDaniel Eklöf2020-08-16-16/+2
| |
| * csi: add xtsave()Daniel Eklöf2020-08-16-6/+58
| | | | | | | | This function stores the current state of DECSET private modes.
| * csi: decrst: spell decset correctlyDaniel Eklöf2020-08-16-1/+1
| |
| * csi: add DEC names to a couple of DECSET modesDaniel Eklöf2020-08-16-1/+6
| |
| * csi: break out decset/decrstDaniel Eklöf2020-08-16-274/+206
|/
* Merge branch 'spelling-fix' into masterDaniel Eklöf2020-08-16-1/+1
|\
| * Fix spelling mistake in vt.cCraig Barnes2020-08-16-1/+1
|/
* changelog: add ordoviz to contributorsDaniel Eklöf2020-08-16-0/+1
|
* Merge branch 'typos' into masterDaniel Eklöf2020-08-16-6/+6
|\
| * Fix typosLennard Hofmann2020-08-15-6/+6
|/
* Merge branch 'spelling-fixes' into masterDaniel Eklöf2020-08-15-12/+12
|\
| * Fix some spelling mistakesCraig Barnes2020-08-15-12/+12
| |
* | Merge branch 'typo' into masterDaniel Eklöf2020-08-15-1/+1
|\ \ | |/ |/|
| * Fix typoBirger Schacht2020-08-15-1/+1
|/
* readme: ctrl+shift+n: add link to wikiDaniel Eklöf2020-08-15-3/+4
|
* changelog: remove duplicate entries (caused by bad merge)Daniel Eklöf2020-08-14-4/+0
|
* render: render the render timer *before* committing the main surfaceDaniel Eklöf2020-08-14-17/+17
|
* render: render-timer: position sub-surface similar to the scrollback indicatorDaniel Eklöf2020-08-14-1/+5
|
* Merge branch 'mouse-binding-actions' into masterDaniel Eklöf2020-08-14-53/+160
|\ | | | | | | Closes #79. Closes #75.
| * input: mouse motion: don't update selection while scrollback searchingDaniel Eklöf2020-08-14-2/+4
| | | | | | | | | | When we are doing a scrollback search, the selection *is* ongoing. We still don't want to update the selection when the mouse moves.
| * input: bindings: calculate 'cursor_is_on_grid' once onlyDaniel Eklöf2020-08-14-18/+8
| |
| * footrc: fix combo for select-begin-blockDaniel Eklöf2020-08-14-1/+1
| | | | | | | | Typo: should be a '+', not a '='.
| * input: mouse-bindings: ignore ShiftDaniel Eklöf2020-08-14-3/+9
| | | | | | | | | | | | | | | | Shift is used to enable selection when the client application is grabbing the mouse. As such, mouse bindings *never* have Shift as a modifier, but should still trigger when Shift is being pressed.
| * config: don't allow Shift in mouse bindingsDaniel Eklöf2020-08-14-0/+9
| | | | | | | | | | Shift is a special modifier that is used to enable selection when the client application is grabbing the mouse.
| * input: mouse-bindings: check selection is enabled/possible and that pointer is on gridDaniel Eklöf2020-08-14-13/+33
| | | | | | | | | | | | | | | | | | | | We shouldn't start or modify a selection if selection isn't possible (i.e. client application is grabbing the mouse, and user isn't holding Shift). We also shouldn't start or modify a selection if the pointer is outside the grid (updating an ongoing selection on motion events is an exception to this).
| * doc: footrc: mouse-bindings: clean up descriptionDaniel Eklöf2020-08-14-14/+10
| |
| * changelog: new mouse actionsDaniel Eklöf2020-08-14-0/+6
| |
| * config: mouse bindings: add select-begin-block and select-rowDaniel Eklöf2020-08-14-19/+40
| |
| * selection: extend: set ongoing to trueDaniel Eklöf2020-08-14-0/+2
| |
| * selection: finalize: clear ongoing selectionDaniel Eklöf2020-08-14-3/+3
| | | | | | | | | | | | | | | | | | | | Check for ongoing selection, and *clear* it before bailing out due to the selection not having an end-point. This fixes an issue where a selection was kept as ongoing, even though the button had been released. Typically triggered by clicking without moving the mouse; this started a new selection, then (tried to) finalize it, but failed since the selection didn't have an end-point.
| * selection: update: don't update if there's no ongoing selectionDaniel Eklöf2020-08-14-0/+3
| |
| * doc: footrc: document the new mouse actionsDaniel Eklöf2020-08-14-0/+18
| |
| * config: add mouse specific bind actionsDaniel Eklöf2020-08-14-38/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This extends the "normal" bind action enum with mouse specific actions. When parsing key bindings, we only check up to the last valid keyboard binding, while mouse bindings support *both* key actions and mouse actions. The new actions are: * select-begin: starts an interactive selection * select-extend: interactively extend an existing selection * select-word: select word under cursor * select-word-whitespace: select word under cursor, where the only word separating characters are whitespace characters. The old hard-coded selection "bindings" have been converted to instead use these actions, via default bindings added to the configuration.
| * changelog: click count in mouse bindingsDaniel Eklöf2020-08-14-0/+2
| |
| * changelog: modifier support in mouse bindingsDaniel Eklöf2020-08-14-0/+2
|/
* Merge branch 'click-count-in-mouse-bindings' into masterDaniel Eklöf2020-08-14-32/+65
|\ | | | | | | Closes #78
| * changelog: click count in mouse bindingsDaniel Eklöf2020-08-14-0/+2
| |
| * doc: footrc: document click count in mouse bindingsDaniel Eklöf2020-08-14-3/+12
| |
| * config: mouse bindings: add support for click countDaniel Eklöf2020-08-14-2/+26
| | | | | | | | Specified by appending "-X", where X is a number.
| * config: wrap LOG_AND_NOTIFY_*() in do {} while (0)Daniel Eklöf2020-08-14-27/+25
|/ | | | This allows us to use these macros in if-statement without braces.
* Merge branch 'modifiers-in-mouse-bindings' into masterDaniel Eklöf2020-08-14-318/+589
|\
| * doc: footrc: document modifiers in mouse bindingsDaniel Eklöf2020-08-13-3/+5
| |
| * changelog: modifier support in mouse bindingsDaniel Eklöf2020-08-13-0/+2
| |
| * config: key/mouse bindings: refactor: less parsing in keyboard_enter()Daniel Eklöf2020-08-13-443/+524
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies the handling of mouse and keyboard bindings. Before, the bindings where parsed *both* when loading the configuration, and then on every keyboard enter event. This was done since keys require a keymap to be decoded. Something we don't have at configuration time. The idea was that at config time, we used a default keymap just to verify the key combo strings were valid. The following has changed: * The bindings in the config struct is now *one* key combo per entry. Previously, it was one *action* per entry, and each entry had one or more key combos. Doing it this way makes it easier when converting the binding in the keyboard enter event (which previously had to expand the combos anyway). * The bindings in the config struct no longer contains any unparsed strings. A key binding contains a decoded 'modifier' struct (which specifies whether e.g. ctrl, or shift, or ctrl+shift must be pressed for the binding to be used). It also contains a decoded XKB keysym. * A mouse binding in the config struct is similar to a key binding, except it contains the button, and click count instead of the XKB key sym. * The modifiers in the user-specified key combo is decoded at config time, by using the pre-defined XKB constants XKB_MOD_NAME_<modifier>. The result is stored in a 'modifiers' struct, which is just a collection of booleans; one for each supported modifier. The supported modifiers are: shift, ctrl, alt and meta/super. * The key sym is decoded at config time using xkb_keysym_from_name(). This call does *not* depend on a keymap. * The mouse button is decoded at config time using a hardcoded mapping table (just like before). * The click count is currently hard-coded to 1. * In the keyboard enter event, all we need to do is pre-compute the xkb_mod_mask_t variable for each key/mouse binding, and find all the *key codes* that map to the (already decoded) symbol. For mouse bindings, the modifiers are the *only* reason we convert the mouse bindings at all. In fact, on button events, we check if the seat has a keyboard. If not, we use the mouse bindings from the configuration directly, and simply filter out those with a non-empty set of modifiers.
| * input: pointer-leave: don't reset mouse properties with memset()Daniel Eklöf2020-08-13-1/+6
| | | | | | | | | | Using memset() also clears the mouse bindings. This is both incorrect, and leaked memory.
| * wayland: global-remove: return after finding a matching seatDaniel Eklöf2020-08-13-0/+1
| |
| * wayland: global-remove: fix call to pointer_listener.leave()Daniel Eklöf2020-08-13-5/+9
| | | | | | | | | | Don't call it when we have keyboard focus, call it when we have mouse focus.
| * config: wip: add support for modifiers in mouse bindingsDaniel Eklöf2020-08-13-31/+207
| | | | | | | | | | | | | | Mouse bindings can now include modifiers. They are specified in pretty much the same way as in keyboard bindings: Control+BTN_LEFT
* | input: don't crash on mouse motion events on the render timer surfaceDaniel Eklöf2020-08-14-1/+8
|/
* render: oops... swprintf() needs to number of *chars*, not *bytes*Daniel Eklöf2020-08-13-1/+1
|
* render: fix printf-errors in 32-bit buildsDaniel Eklöf2020-08-13-2/+3
|
* config: add tweak.render-timer optionDaniel Eklöf2020-08-13-55/+158
| | | | | | | | | This can be set to 'none' (the default), 'osd', 'log' or 'both'. When 'osd' is enabled, we'll render the frame rendering time to a sub-surface after each frame. When 'log' is enabled, the frame rendering time is logged on stderr.
* doc: footclient.1: move DESCRIPTION up before OPTIONSDaniel Eklöf2020-08-13-10/+10
|
* doc: foot.1: move DESCRIPTION up before OPTIONSDaniel Eklöf2020-08-13-10/+10
|
* selection: improve handling of multi-column charactersDaniel Eklöf2020-08-13-13/+14
| | | | | * Don't assume multi-column characters are exactly *two* columns * Check for CELL_MULT_COL_SPACER values instead of using wcwidth()
* selection: handle multi-column characters when reversing selection directionDaniel Eklöf2020-08-13-16/+30
|
* changelog: cancelling -> cancelingDaniel Eklöf2020-08-13-1/+1
|
* Merge branch 'selection-inversion' into masterDaniel Eklöf2020-08-13-0/+41
|\
| * selection: adjust start point when the selection changes directionDaniel Eklöf2020-08-12-0/+41
| | | | | | | | | | | | | | | | | | Without this, the initial cell will always be selected, regardless of how the selection is moved to the left or right. With this patch, the initial cell will only be selected while the selection is being made in the original direction. Changing direction of the selection moves the start point to next/previous character.
* | Merge branch 'custom-selection-colors' into masterDaniel Eklöf2020-08-13-8/+33
|\ \ | |/ |/|
| * config: make selection foreground/background colors configurableDaniel Eklöf2020-08-12-8/+33
|/ | | | | | | | | The default is still to inverse the regular foreground/background colors. If the user sets *both* of the new options, selection-foreground and selection-background, those colors will *always* be used for selected cells, instead of inverting the regular foreground/background colors.
* doc: foot.1: don't talk about using '--' on the command lineDaniel Eklöf2020-08-12-3/+2
| | | | This used to be necessary, but isn't anymore.
* search: don't update/refresh match when modifier keys are pressedDaniel Eklöf2020-08-12-0/+3
|
* search: fix viewport not moving if we tried to move it past the scrollback startDaniel Eklöf2020-08-12-21/+57
| | | | | | | | | | | | If the match was somewhere near the scrollback beginning, and if the entire scrollback hadn't yet been filled, we ended up trying to move the viewport past the beginning of the scrollback, which we then adjusted in the wrong direction, causing the viewport to not move at all. Besides being a bad user experience, since the new match wasn't visible, foot would also crash if you manually scrolled up to the match.
* Revert "ci: sr.ht: just testing..."Daniel Eklöf2020-08-11-2/+2
| | | | This reverts commit b7b7b56b3d64d1eca008082331d94eecfd60dfdf.
* ci: sr.ht: just testing...Daniel Eklöf2020-08-11-2/+2
|
* render: fix compilation errors in 32-bit buildsDaniel Eklöf2020-08-11-6/+9
| | | | timeval.tv_usec is an 'unsigned long long' on 32-bit
* ci: gitlab: let's see if we can do 32-bit buildsDaniel Eklöf2020-08-11-4/+24
|
* main: include our own bitness when logging the architectureDaniel Eklöf2020-08-11-1/+1
|
* shm: don't even try to punch a memfd hole in 32-bitDaniel Eklöf2020-08-11-0/+6
| | | | | This ensures we don't issue a warning if we fail, something that will just confuse users, as SHM scrolling is disabled in 32-bit anyway.
* Merge branch 'xmalloc-conversion' into masterDaniel Eklöf2020-08-09-65/+146
|\
| * Handle allocation failures explicitly in *_init() functionsCraig Barnes2020-08-09-4/+20
| |
| * Convert most dynamic allocations to use functions from xmalloc.hCraig Barnes2020-08-08-68/+133
|/