From 7bb756ccbc8e71c7935105d3339ffc355d29ec46 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 18 Sep 2020 21:29:39 +0200 Subject: changelog: add new ‘unreleased’ section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 540f96b3..03e64784 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +* [Unreleased](#Unreleased) * [1.5.0](#1-5-0) * [1.4.4](#1-4-4) * [1.4.3](#1-4-3) @@ -12,6 +13,17 @@ * [1.2.1](#1-2-1) * [1.2.0](#1-2-0) + +## Unreleased +### Added +### Changed +### Deprecated +### Removed +### Fixed +### Security +### Contributors + + ## 1.5.0 ### Deprecated -- cgit v1.3 From 59ca98f989129efc1f4a77929921571a8e06949f Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 27 Sep 2020 14:31:39 +0200 Subject: input: mouse: match binding if binding’s click count is *less* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow a mouse binding to match even if its click count is less than the actual click count. If there are multiple bindings that match, use the one with the highest click count (that less than, or equal to the actual click count). Closes #146 --- CHANGELOG.md | 7 +++++++ input.c | 24 ++++++++++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 03e64784..3fbc2cc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,13 @@ ### Deprecated ### Removed ### Fixed + +* Mouse bindings now match even if the actual click count is larger + than specified in the binding. This allows you to, for example, + quickly press the middle-button to paste multiple times + (https://codeberg.org/dnkl/foot/issues/146). + + ### Security ### Contributors diff --git a/input.c b/input.c index cfa99574..cc14d41b 100644 --- a/input.c +++ b/input.c @@ -1526,6 +1526,8 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer, * applications */ mods &= ~(1 << seat->kbd.mod_shift); + const struct mouse_binding *match = NULL; + tll_foreach(seat->mouse.bindings, it) { const struct mouse_binding *binding = &it->item; @@ -1539,19 +1541,25 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer, continue; } - if (binding->count != seat->mouse.count) { + if (binding->count > seat->mouse.count) { /* Not correct click count */ continue; } + if (match == NULL || binding->count > match->count) + match = binding; + } + + if (match != NULL) { seat->mouse.consumed = execute_binding( - seat, term, binding->action, NULL, serial); - break; + seat, term, match->action, NULL, serial); } } else { /* Seat does NOT have a keyboard - use mouse bindings *without* modifiers */ + const struct config_mouse_binding *match = NULL; + tll_foreach(seat->wayl->conf->bindings.mouse, it) { const struct config_mouse_binding *binding = &it->item; @@ -1560,7 +1568,7 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer, continue; } - if (binding->count != seat->mouse.count) { + if (binding->count > seat->mouse.count) { /* Incorrect click count */ continue; } @@ -1571,9 +1579,13 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer, continue; } + if (match == NULL || binding->count > match->count) + match = binding; + } + + if (match != NULL) { seat->mouse.consumed = execute_binding( - seat, term, binding->action, NULL, serial); - break; + seat, term, match->action, NULL, serial); } } -- cgit v1.3 From acd1d6a4a313ba3407482036403c7b0c442671dd Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 29 Sep 2020 10:11:03 +0200 Subject: changelog: fixed color flashes with OSC 4,10,11 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fbc2cc0..ca17ca4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ than specified in the binding. This allows you to, for example, quickly press the middle-button to paste multiple times (https://codeberg.org/dnkl/foot/issues/146). +* Color flashes when changing the color palette with OSC 4,10,11 + (https://codeberg.org/dnkl/foot/issues/141). ### Security -- cgit v1.3 From b12ce3d7d787522a866658d01f606fdea66b0517 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 24 Sep 2020 18:35:40 +0200 Subject: grid: reflow: retain scrollback position Closes #142 --- CHANGELOG.md | 2 ++ grid.c | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index ca17ca4a..a2b30c01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ (https://codeberg.org/dnkl/foot/issues/146). * Color flashes when changing the color palette with OSC 4,10,11 (https://codeberg.org/dnkl/foot/issues/141). +* Scrollback position is now retained when resizing the window + (https://codeberg.org/dnkl/foot/issues/142). ### Security diff --git a/grid.c b/grid.c index e4b7c063..5f2b4277 100644 --- a/grid.c +++ b/grid.c @@ -65,6 +65,9 @@ grid_reflow(struct grid *grid, int new_rows, int new_cols, const int old_rows = grid->num_rows; const int old_cols = grid->num_cols; + /* Is viewpoint tracking current grid offset? */ + const bool view_follows = grid->view == grid->offset; + int new_col_idx = 0; int new_row_idx = 0; @@ -97,9 +100,14 @@ grid_reflow(struct grid *grid, int new_rows, int new_cols, tll_push_back(tracking_points, &cursor); tll_push_back(tracking_points, &saved_cursor); + struct coord viewport = {0, grid->view}; + if (!view_follows) + tll_push_back(tracking_points, &viewport); + for (size_t i = 0; i < tracking_points_count; i++) tll_push_back(tracking_points, _tracking_points[i]); + /* * Walk the old grid */ @@ -308,7 +316,8 @@ grid_reflow(struct grid *grid, int new_rows, int new_cols, grid->offset += new_rows; while (new_grid[grid->offset] == NULL) grid->offset = (grid->offset + 1) & (new_rows - 1); - grid->view = grid->offset; + + grid->view = view_follows ? grid->offset : viewport.row; /* Ensure all visible rows have been allocated */ for (int r = 0; r < new_screen_rows; r++) { -- cgit v1.3 From 8e04b086158730b615803c45368f1fe7a6bce95e Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 27 Sep 2020 11:11:45 +0200 Subject: input: trackpad scroll: correctly convert pixel movements to line movements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Trackpad scroll movements are in pixels. Foot previously “translated” these directly to line movements (i.e. a one pixel scroll event was translated into a one line scroll). Now we use the line height of the terminal and correctly convert pixels to lines. This makes the trackpad scroll speed in foot consistent with the scroll speed in e.g. Alacritty and Kitty. --- CHANGELOG.md | 4 ++++ input.c | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index a2b30c01..0eb90527 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,10 @@ (https://codeberg.org/dnkl/foot/issues/141). * Scrollback position is now retained when resizing the window (https://codeberg.org/dnkl/foot/issues/142). +* Trackpad scrolling speed. Note that it is much slower compared to + previous foot versions. Use the **multiplier** option in `foot.ini` + if you find the new speed too slow + (https://codeberg.org/dnkl/foot/issues/144). ### Security diff --git a/input.c b/input.c index cc14d41b..20c1381c 100644 --- a/input.c +++ b/input.c @@ -1688,6 +1688,8 @@ wl_pointer_axis(void *data, struct wl_pointer *wl_pointer, if (seat->mouse.have_discrete) return; + assert(seat->mouse_focus != NULL); + /* * Aggregate scrolled amount until we get at least 1.0 * @@ -1697,10 +1699,12 @@ wl_pointer_axis(void *data, struct wl_pointer *wl_pointer, seat->mouse.axis_aggregated += seat->wayl->conf->scrollback.multiplier * wl_fixed_to_double(value); - if (fabs(seat->mouse.axis_aggregated) >= 1.) { - mouse_scroll(seat, round(seat->mouse.axis_aggregated)); - seat->mouse.axis_aggregated = 0.; - } + if (fabs(seat->mouse.axis_aggregated) < seat->mouse_focus->cell_height) + return; + + int lines = seat->mouse.axis_aggregated / seat->mouse_focus->cell_height; + mouse_scroll(seat, lines); + seat->mouse.axis_aggregated -= (double)lines * seat->mouse_focus->cell_height; } static void -- cgit v1.3 From 1bc9c1c23078563903484dbb7b60384566ee5f53 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 29 Sep 2020 09:49:21 +0200 Subject: changelog: reword trackpad scrolling speed entry --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 0eb90527..49cdb284 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,11 @@ previous foot versions. Use the **multiplier** option in `foot.ini` if you find the new speed too slow (https://codeberg.org/dnkl/foot/issues/144). +* Trackpad scrolling speed to better match the mouse scrolling speed, + and to be consistent with other (Wayland) terminal emulators. Note + that it is (much) slower compared to previous foot versions. Use the + **multiplier** option in `foot.ini` if you find the new speed too + slow (https://codeberg.org/dnkl/foot/issues/144). ### Security -- cgit v1.3 From 8181113e3cbe65c932eb78d847781359fe02ecdb Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 29 Sep 2020 19:41:53 +0200 Subject: changelog: multiplier default value changed from 1.0 -> 3.0 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 49cdb284..2344b81f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,11 @@ ## Unreleased ### Added ### Changed + +* Default value of the **multiplier** option in `foot.ini` from `1.0` + to `3.0`. + + ### Deprecated ### Removed ### Fixed -- cgit v1.3 From aa3fcc1251abb8e6f55b0071f99cc5f666449b71 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 29 Sep 2020 19:43:39 +0200 Subject: changelog: multiplier: the option belongs to the ‘scrollback’ section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 2344b81f..89f0de13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,8 +18,8 @@ ### Added ### Changed -* Default value of the **multiplier** option in `foot.ini` from `1.0` - to `3.0`. +* Default value of the **scrollback.multiplier** option in `foot.ini` + from `1.0` to `3.0`. ### Deprecated -- cgit v1.3 From 3c057fb6001637c89018e5647076f7c481d8ac00 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 29 Sep 2020 19:47:29 +0200 Subject: changelog: trackpad scrolling: ‘multiplier’ is in the ‘scrollback’ section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 89f0de13..67d38093 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,8 +41,8 @@ * Trackpad scrolling speed to better match the mouse scrolling speed, and to be consistent with other (Wayland) terminal emulators. Note that it is (much) slower compared to previous foot versions. Use the - **multiplier** option in `foot.ini` if you find the new speed too - slow (https://codeberg.org/dnkl/foot/issues/144). + **scrollback.multiplier** option in `foot.ini` if you find the new + speed too slow (https://codeberg.org/dnkl/foot/issues/144). ### Security -- cgit v1.3 From 852fc049c860fc9004101fcb5cecfead719d04cc Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 7 Oct 2020 18:34:48 +0200 Subject: config: ignore key/value pairs following an invalid section name When we detected an invalid section name, we correctly logged this and warned the user. However, the internal state machine now had an invalid section enum value. This caused a crash when the next key/value pair was to be parsed and we tried to lookup which parser function to call. Closes #159. --- CHANGELOG.md | 2 ++ config.c | 7 +++++++ 2 files changed, 9 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 67d38093..3bbc4fa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,8 @@ that it is (much) slower compared to previous foot versions. Use the **scrollback.multiplier** option in `foot.ini` if you find the new speed too slow (https://codeberg.org/dnkl/foot/issues/144). +* Crash when `foot.ini` contains an invalid section name + (https://codeberg.org/dnkl/foot/issues/159). ### Security diff --git a/config.c b/config.c index c69af59d..ff5d6c59 100644 --- a/config.c +++ b/config.c @@ -1673,6 +1673,11 @@ parse_config_file(FILE *f, struct config *conf, const char *path, bool errors_ar continue; } + if (section >= SECTION_COUNT) { + /* Last section name was invalid; ignore all keys in it */ + continue; + } + char *key = strtok(key_value, "="); if (key == NULL) { LOG_AND_NOTIFY_ERR("%s:%d: syntax error: no key specified", path, lineno); @@ -1711,6 +1716,8 @@ parse_config_file(FILE *f, struct config *conf, const char *path, bool errors_ar LOG_DBG("section=%s, key='%s', value='%s', comment='%s'", section_info[section].name, key, value, comment); + assert(section >= 0 && section < SECTION_COUNT); + parser_fun_t section_parser = section_info[section].fun; assert(section_parser != NULL); -- cgit v1.3 From a53e8c28661f3267555a3e06ce7ef3b90a9cfbe1 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 8 Oct 2020 19:53:11 +0200 Subject: render: apply opacity correctly when in reverse video mode --- CHANGELOG.md | 1 + render.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bbc4fa4..66a8dc01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ speed too slow (https://codeberg.org/dnkl/foot/issues/144). * Crash when `foot.ini` contains an invalid section name (https://codeberg.org/dnkl/foot/issues/159). +* Background opacity when in _reverse video_ mode. ### Security diff --git a/render.c b/render.c index 210eaf47..20d66512 100644 --- a/render.c +++ b/render.c @@ -403,7 +403,9 @@ render_cell(struct terminal *term, pixman_image_t *pix, pixman_color_t fg = color_hex_to_pixman(_fg); pixman_color_t bg = color_hex_to_pixman_with_alpha( - _bg, _bg == term->colors.bg ? term->colors.alpha : 0xffff); + _bg, + (_bg == (term->reverse ? term->colors.fg : term->colors.bg) + ? term->colors.alpha : 0xffff)); if (cell->attrs.dim) color_dim(&fg); @@ -549,8 +551,12 @@ render_margin(struct terminal *term, struct buffer *buf, const int line_count = end_line - start_line; uint32_t _bg = !term->reverse ? term->colors.bg : term->colors.fg; + pixman_color_t bg = color_hex_to_pixman_with_alpha( - _bg, _bg == term->colors.bg ? term->colors.alpha : 0xffff); + _bg, + (_bg == (term->reverse ? term->colors.fg : term->colors.bg) + ? term->colors.alpha : 0xffff)); + if (term->is_searching) color_dim(&bg); -- cgit v1.3 From 7a7ba599c3f14c3e86645fc7e23225f513ef5414 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 2 Oct 2020 20:55:10 +0200 Subject: sixel: overwrite-by-rectangle expects ‘width’ to not exceed screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a crash when the emitted sixel extends beyond the right margin. The crash only happens when there are other sixel images already emitted. Fixes part of #151 --- CHANGELOG.md | 2 ++ sixel.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 66a8dc01..7afc1e35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,8 @@ * Crash when `foot.ini` contains an invalid section name (https://codeberg.org/dnkl/foot/issues/159). * Background opacity when in _reverse video_ mode. +* Crash when writing a sixel image that extends outside the terminal's + right margin (https://codeberg.org/dnkl/foot/issues/151). ### Security diff --git a/sixel.c b/sixel.c index f9c11037..0600a434 100644 --- a/sixel.c +++ b/sixel.c @@ -482,7 +482,8 @@ sixel_unhook(struct terminal *term) }; sixel_overwrite_by_rectangle( - term, cursor->row, image.pos.col, image.rows, image.cols); + term, cursor->row, image.pos.col, + image.rows, min(image.cols, term->cols - image.pos.col)); LOG_DBG("generating %dx%d pixman image at %d-%d", image.width, image.height, -- cgit v1.3 From cdcdfe527c353bf55c3aaf9f843ee2e7c3cf9b0f Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 2 Oct 2020 20:56:44 +0200 Subject: sixel: fix sheared image when image crosses scrollback wrap-around MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a sixel image crosses the scrollback wrap-around, it is split up into (at least) two pieces. We use cursor->point.col for all pieces’ x-coordinate. This caused the final image to appear sheared, since we do a carriage-return (after a number of linefeeds) after each piece - this causes the cursor’s position to be reset to the left margin. The solution is simple; remember the cursor’s initial x-coordinate, and use that to position all image pieces. Closes #151. --- CHANGELOG.md | 3 +++ sixel.c | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 7afc1e35..64e94377 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,9 @@ * Background opacity when in _reverse video_ mode. * Crash when writing a sixel image that extends outside the terminal's right margin (https://codeberg.org/dnkl/foot/issues/151). +* Sixel image at non-zero column positions getting sheared at + seemingly random occasions + (https://codeberg.org/dnkl/foot/issues/151). ### Security diff --git a/sixel.c b/sixel.c index 0600a434..747e3d00 100644 --- a/sixel.c +++ b/sixel.c @@ -448,6 +448,16 @@ sixel_unhook(struct terminal *term) int pixel_rows_left = term->sixel.image.height; const int stride = term->sixel.image.width * sizeof(uint32_t); + /* + * Need to 'remember' current cursor column. + * + * If we split up the sixel (to avoid scrollback wrap-around), we + * will emit a carriage-return (after several linefeeds), which + * will reset the cursor column to 0. If we use _that_ column for + * the subsequent image parts, the image will look sheared. + */ + const int start_col = term->grid->cursor.point.col; + /* We do not allow sixels to cross the scrollback wrap-around, as * this makes intersection calculations much more complicated */ while (pixel_rows_left > 0) { @@ -478,7 +488,7 @@ sixel_unhook(struct terminal *term) .height = height, .rows = (height + term->cell_height - 1) / term->cell_height, .cols = (width + term->cell_width - 1) / term->cell_width, - .pos = (struct coord){cursor->col, cur_row}, + .pos = (struct coord){start_col, cur_row}, }; sixel_overwrite_by_rectangle( -- cgit v1.3 From 98c316556f9fba1591e307bb4d25eb4e02f45026 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 7 Oct 2020 18:46:11 +0200 Subject: changelog: we’ve fixed several sixel+reflow related bugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 64e94377..2b972b6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,8 @@ * Sixel image at non-zero column positions getting sheared at seemingly random occasions (https://codeberg.org/dnkl/foot/issues/151). +* Crash after either resizing a window or changing the font size if + there were sixels present in the scrollback while doing so. ### Security -- cgit v1.3 From 5477ee88948166f76c9ac69bc28bf8af8d8bd869 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 9 Oct 2020 18:53:00 +0200 Subject: csi: only respond to Primary DA when Ps == 0 --- CHANGELOG.md | 1 + csi.c | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b972b6b..2ab0f56e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ (https://codeberg.org/dnkl/foot/issues/151). * Crash after either resizing a window or changing the font size if there were sixels present in the scrollback while doing so. +* _Send Device Attributes_ to only send a response if `Ps == 0`. ### Security diff --git a/csi.c b/csi.c index 53a90805..7c4d5077 100644 --- a/csi.c +++ b/csi.c @@ -653,6 +653,11 @@ csi_dispatch(struct terminal *term, uint8_t final) break; case 'c': { + if (vt_param_get(term, 0, 0) != 0) { + UNHANDLED(); + break; + } + /* Send Device Attributes (Primary DA) */ /* -- cgit v1.3 From 4bf61fe2f11536c98edb8a2859f762abd5d66c78 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 9 Oct 2020 19:19:40 +0200 Subject: changelog: add contributor --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ab0f56e..76c08a10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,8 @@ ### Security ### Contributors +* [craigbarnes](https://codeberg.org/craigbarnes) + ## 1.5.0 -- cgit v1.3 From 282af4478413d3c9390a5332e386bd6dc049946b Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 10 Oct 2020 10:27:42 +0200 Subject: config: bind shift+insert to primary-paste by default --- CHANGELOG.md | 2 ++ config.c | 1 + doc/foot.ini.5.scd | 4 ++-- foot.ini | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 76c08a10..5747cf99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ * Default value of the **scrollback.multiplier** option in `foot.ini` from `1.0` to `3.0`. +* `shift`+`insert` now pastes from the primary selection by + default. This is in addition to middle-clicking with the mouse. ### Deprecated diff --git a/config.c b/config.c index e984ea25..437bd5d8 100644 --- a/config.c +++ b/config.c @@ -1766,6 +1766,7 @@ add_default_key_bindings(struct config *conf) add_binding(BIND_ACTION_SCROLLBACK_DOWN, shift, XKB_KEY_Page_Down); add_binding(BIND_ACTION_CLIPBOARD_COPY, ctrl_shift, XKB_KEY_C); add_binding(BIND_ACTION_CLIPBOARD_PASTE, ctrl_shift, XKB_KEY_V); + add_binding(BIND_ACTION_PRIMARY_PASTE, shift, XKB_KEY_Insert); add_binding(BIND_ACTION_SEARCH_START, ctrl_shift, XKB_KEY_R); add_binding(BIND_ACTION_FONT_SIZE_UP, ctrl, XKB_KEY_plus); add_binding(BIND_ACTION_FONT_SIZE_UP, ctrl, XKB_KEY_equal); diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd index 60da2d67..191c54e3 100644 --- a/doc/foot.ini.5.scd +++ b/doc/foot.ini.5.scd @@ -291,8 +291,8 @@ e.g. *search-start=none*. Pastes from the _clipboard_. Default: _Control+Shift+V_. *primary-paste* - Pastes from the _primary selection_. Default: not bound (to a - _key_, see *mouse-bindings*). + Pastes from the _primary selection_. Default: _Shift+Insert_ (also + defined in *mouse-bindings*). *search-start* Starts a scrollback/history search. Default: _Control+Shift+R_. diff --git a/foot.ini b/foot.ini index 952bf00c..aa0fda50 100644 --- a/foot.ini +++ b/foot.ini @@ -66,6 +66,7 @@ # scrollback-down-line=none # clipboard-copy=Control+Shift+C # clipboard-paste=Control+Shift+V +# primary-paste=Shift+Insert # search-start=Control+Shift+R # font-increase=Control+plus Control+equal Control+KP_Add # font-decrease=Control+minus Control+KP_Subtract -- cgit v1.3 From e842f4936740477a28357e8238455253aa2f02de Mon Sep 17 00:00:00 2001 From: Sergey Nazaryev Date: Sat, 10 Oct 2020 21:13:08 +0300 Subject: selection: use appropriate check for PRIMARY paste Assume it could be a copy-paste typo. We should check PRIMARY, not CLIPBOARD. Without this fix, we can't use PRIMARY until we copy anything to CLIPBOARD. --- CHANGELOG.md | 1 + selection.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 5747cf99..7142cbe2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ * Crash after either resizing a window or changing the font size if there were sixels present in the scrollback while doing so. * _Send Device Attributes_ to only send a response if `Ps == 0`. +* Paste from primary when clipboard is empty. ### Security diff --git a/selection.c b/selection.c index 6cfacc02..7c814467 100644 --- a/selection.c +++ b/selection.c @@ -1381,8 +1381,8 @@ selection_from_primary(struct seat *seat, struct terminal *term) return; } - struct wl_clipboard *clipboard = &seat->clipboard; - if (clipboard->data_offer == NULL) + struct wl_primary *primary = &seat->primary; + if (primary->data_offer == NULL) return; term->is_sending_paste_data = true; -- cgit v1.3 From 70a6f8882358751ad0376929353c9a31d9811700 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 10 Oct 2020 23:34:21 +0200 Subject: changelog: update ‘contributors’ list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 7142cbe2..a34b5b6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,6 +63,7 @@ ### Contributors * [craigbarnes](https://codeberg.org/craigbarnes) +* [zar](https://codeberg.org/zar) ## 1.5.0 -- cgit v1.3 From a32464e296dbedd623cf444aae5b44c44e0011f6 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 11 Oct 2020 19:20:24 +0200 Subject: changelog: remove duplicate entry --- CHANGELOG.md | 4 ---- 1 file changed, 4 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index a34b5b6b..d6fbc2d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,10 +36,6 @@ (https://codeberg.org/dnkl/foot/issues/141). * Scrollback position is now retained when resizing the window (https://codeberg.org/dnkl/foot/issues/142). -* Trackpad scrolling speed. Note that it is much slower compared to - previous foot versions. Use the **multiplier** option in `foot.ini` - if you find the new speed too slow - (https://codeberg.org/dnkl/foot/issues/144). * Trackpad scrolling speed to better match the mouse scrolling speed, and to be consistent with other (Wayland) terminal emulators. Note that it is (much) slower compared to previous foot versions. Use the -- cgit v1.3 From 77a87b30ffd424a57c0da5563586107f3e6944ba Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 11 Oct 2020 19:31:01 +0200 Subject: changelog: prepare for 1.5.1 --- CHANGELOG.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index d6fbc2d0..7497e499 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -* [Unreleased](#Unreleased) +* [1.5.1](#1-5-1) * [1.5.0](#1-5-0) * [1.4.4](#1-4-4) * [1.4.3](#1-4-3) @@ -14,8 +14,8 @@ * [1.2.0](#1-2-0) -## Unreleased -### Added +## 1.5.1 + ### Changed * Default value of the **scrollback.multiplier** option in `foot.ini` @@ -24,8 +24,6 @@ default. This is in addition to middle-clicking with the mouse. -### Deprecated -### Removed ### Fixed * Mouse bindings now match even if the actual click count is larger @@ -55,7 +53,6 @@ * Paste from primary when clipboard is empty. -### Security ### Contributors * [craigbarnes](https://codeberg.org/craigbarnes) -- cgit v1.3