aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
...
* readme: add link to IRC logsDaniel Eklöf2021-05-24-2/+3
|
* Merge branch 'reflow-osc8-performance'Daniel Eklöf2021-05-23-55/+78
|\
| * grid: reflow: uri-ranges: avoid looping URI ranges when reflowingDaniel Eklöf2021-05-23-54/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we know the following: * URI ranges are sorted * URI coordinates are unique * URI ranges don’t cross rows We can optimize URI range reflowing by: * Checking if the *first* URI range’s start coordinate is on the current column. If so, keep a pointer to it. * Use this pointer as source when instantiating the reflowed URI range * If we already have a non-NULL range pointer, check its end coordinate instead. * If it matches, close the *last* URI range we inserted on the new row, and free/remove the range from the old row. * When line breaking, we only need to check if the *last* URI range is unclosed.
| * grid: add grid_row_uri_range_destroy()Daniel Eklöf2021-05-23-1/+7
| |
| * term: osc8_close: debug: assert all URI coordinates are uniqueDaniel Eklöf2021-05-23-0/+14
|/
* Merge branch 'foot_option_correction'Daniel Eklöf2021-05-22-1/+1
|\
| * foot.ini: use correct name for command-focused paramClayton Craft2021-05-22-1/+1
|/ | | | | | This expects a hyphen, not underscore, in the option name: err: config.c:892: /home/user/.config/foot/foot.ini:34: [bell]: command_focused: invalid key
* Merge branch 'sort-osc8-ranges'Daniel Eklöf2021-05-22-1/+7
|\
| * grid: row_add_uri_range: ensure the URIs are sortedDaniel Eklöf2021-05-22-1/+7
|/
* Merge branch 'dont-allow-overlapping-urls'Daniel Eklöf2021-05-22-10/+38
|\
| * url-mode: codespellDaniel Eklöf2021-05-22-1/+1
| |
| * url-mode: remove overlapping URLs, not just duplicatesDaniel Eklöf2021-05-22-10/+38
|/ | | | | | | | | | | | | | | | | echo -e '\e]8;;https://www.foo.bar\e\\https://www.foo\e]8;;\e\\.bar' will produce an OSC-8 URL (https://www.foo) that is slightly shorter than the auto-detected one (https://www.foo.bar). This produces strange results in URL mode. For example, if url.osc8-underline=always, the OSC8 underline will be removed when url-mode is exited. This patch changes the behavior so that auto-detected URLs that overlap OSC-8 URLs are removed. Note that OSC-8 URLs cannot overlap with each other, and that auto-detected URLs also cannot overlap with each other.
* Merge branch 'configurable-protocols-to-match-in-url-mode'Daniel Eklöf2021-05-22-70/+236
|\ | | | | | | Closes #531
| * config: url.protocols: make it comma separated, for consistencyDaniel Eklöf2021-05-22-10/+21
| |
| * config: add url.protocolsDaniel Eklöf2021-05-22-19/+85
| | | | | | | | | | | | | | This makes the protocols recognized by auto-detected URLs configurable. Closes #531
| * config: move url-mode related options to a dedicated section, ‘url’Daniel Eklöf2021-05-22-51/+140
|/
* Merge branch 'underline-cursor-thickness'Daniel Eklöf2021-05-22-21/+71
|\ | | | | | | Closes #524
| * config: add cursor.underline-thicknessDaniel Eklöf2021-05-22-21/+71
|/ | | | | | | | | | | | | Works in pretty much the same way as ‘beam-thickness’, except that the default value is “the font’s underline thickness”. This means, that when unset, the cursor underline thickness scales with the font size. But, when explicitly set, either to a point size value, or a pixel size, it remains fixed at that size. Closes #524
* Merge branch 'fdm-always-check-for-signals'Daniel Eklöf2021-05-22-14/+21
|\ | | | | | | Closes #534
| * fdm: always check for signals after epoll_pwait(), not only on EINTRDaniel Eklöf2021-05-21-14/+21
|/ | | | | | | | | | | | | | | This fixes an issue where we, at least on FreeBSD, sometimes get stuck in epoll_pwait() after the shell has exited. It turned out to be because the SIGCHLD signal was delivered at the same time FDs were made readable/writeable. I.e. epoll_pwait() returned a non-zero value even though it should have been interrupted by the SIGCHLD. To avoid having to search the entire signal array *every time* epoll_pwait() returns, add a flag that is set in the signal handler. This tells the FDM to scan the signal array after returning from epoll_pwait().
* notifications: use \e[22m to disable boldDaniel Eklöf2021-05-20-7/+10
| | | | | | | | | | | \e[21m was previously used to disable bold. That changed a while ago, to align foot with the majority of other terminal emulators. \e[22m now disables both bold and dim. When this change was done, the user notifications were not updated, meaning the ‘message’ part was always in bold. This was never the intended behavior.
* Merge branch 'irc-update'Daniel Eklöf2021-05-20-5/+3
|\
| * readme: remove my name from the IRC detailsDaniel Eklöf2021-05-20-2/+1
| |
| * readme/doc: update details for IRC channelCraig Barnes2021-05-19-5/+4
|/
* vt: limit maximum value of params in vt_param_get()Craig Barnes2021-05-17-2/+13
| | | | | | | | So that the value is clamped to the range [0, 0x7fffffff] and retains the same value, regardless of whether it's interpreted as a signed or unsigned integer. Closes #522
* render: stop spamming “resize” INFO logsDaniel Eklöf2021-05-17-3/+0
| | | | | | | | It _may_ be acceptable in e.g. tiling WMs, where windows are seldom resized interactively. But in a stacking WM where the typical way of resizing windows is by interactive resizes, this spams way too much.
* grid: disable timing of resize operationsDaniel Eklöf2021-05-17-1/+1
|
* Merge branch 'search-refactor-extend-word'Daniel Eklöf2021-05-17-97/+170
|\ | | | | | | Closes #421
| * changelog: ctrl+w can now be used across linesDaniel Eklöf2021-05-17-0/+2
| |
| * search: match_to_end_of_word(): we update the selection ourselvesDaniel Eklöf2021-05-17-2/+8
| | | | | | | | | | | | No need to call search_find_next() after doing a search_match_to_end_of_word(), since we already *know* we have a match, and where it is.
| * extract: move ‘strip_trailing_empty’ parameter from extra_finish() to extract_begin()Daniel Eklöf2021-05-17-19/+32
| |
| * search: find_next(): correctly wrap row numberDaniel Eklöf2021-05-17-1/+1
| |
| * search: match_to_end_of_word(): use a local macro to bump coordDaniel Eklöf2021-05-17-15/+21
| |
| * search: match_to_end_of_word(): use has_wrapped_around() while extracting textDaniel Eklöf2021-05-17-1/+3
| |
| * search: match_to_end_of_word(): we always extend the selection with at least one characterDaniel Eklöf2021-05-17-3/+1
| |
| * search: match_to_end_of_word(): skip newlines when copying from extraction bufferDaniel Eklöf2021-05-17-1/+7
| |
| * search: match_to_end_of_word(): refactorDaniel Eklöf2021-05-17-61/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite match_to_end_of_word() in terms of * selection_find_word_boundary_right() * extract_begin() + extract_one() + extract_finish() This adds a small overhead, in that extract_*() allocates an internal buffer, from which we then immediately copy, into our newly resized prompt buffer. On the other hand, this makes the matching behavior more consistent with regular mouse selections, and we don’t have to keep two very similar match-to-next-word-boundary implementations in sync.
| * extract: add extract_finish_wide(), and optionally skip stripping trailing empty cellsDaniel Eklöf2021-05-17-13/+55
| | | | | | | | | | | | | | | | extract_finish() returns the extracted text in UTF-8, while extract_finish_wide() returns the extracted text in Unicode. This patch also adds a new argument to extract_finish{,_wide}, that when set to true, skips stripping trailing empty cells.
| * selection: expose find_word_boundary_{left,right}()Daniel Eklöf2021-05-17-12/+21
| |
| * search: find_next(): proper check for scrollback wrap aroundDaniel Eklöf2021-05-17-5/+15
|/ | | | | | Besides disallowing matches that crosses the scrollback wrap-around, this also fixes a crash when the trying to search beyond the last output, when the scrollback history hasn’t yet been completely filled.
* Merge branch 'box-drawing-use-pixman'Daniel Eklöf2021-05-17-114/+279
|\
| * box-drawing: pre-calculate the LIGHT and HEAVY thicknessesDaniel Eklöf2021-05-17-4/+16
| |
| * box-drawing: always pass ‘buf’ as the first parameterDaniel Eklöf2021-05-17-6/+6
| | | | | | | | | | This way, the compiler doesn’t have to waste instructions on re-ordering the parameters
| * box-drawing: don’t inline _thickness()Daniel Eklöf2021-05-17-1/+1
| | | | | | | | | | It results in quite a lot of floating point instructions being emitted in almost every box drawing function we have...
| * box-drawing: use fill_boxes() instead of fill_rectangles()Daniel Eklöf2021-05-17-30/+20
| |
| * box-drawing: increase brightness of solid shadesDaniel Eklöf2021-05-17-3/+3
| |
| * config: add tweak.box-drawing-solid-shades=yes|noDaniel Eklöf2021-05-17-10/+31
| | | | | | | | | | | | | | | | | | | | When enabled, shades are rendered as solid blocks, using a darker variant of the current foreground color. When disabled, shades are instead rendered in a checker box pattern, using the foreground color unmodified. Default is enabled.
| * box-drawing: use an a8 buffer when primary font is antialiasedDaniel Eklöf2021-05-17-1/+3
| | | | | | | | | | This causes relevant box drawing characters (diagonals, arcs etc) to be antialiased as well.
| * box-drawing: change_buffer_format: abort on pixman failureDaniel Eklöf2021-05-17-0/+6
| |
| * box-drawing: apply antialiasing to LIGHT ARCsDaniel Eklöf2021-05-17-40/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When drawing on an a8 buffer, apply antialiasing to LIGHT ARCs. This is done by supersampling; draw to a 4 times bigger buffer, then downsample, where each downsampled pixel is the average of the corresponding 4x4 pixel from the supersampled buffer. We also need to take supersampling into account while adjusting the row and col when pixel aligning the arcs with the regular horizontal/vertical lines. The shape of the ARCs can still be improved. Still, this is a much needed improvement over the current implementation. Closes #279
| * box-drawing: draw_pixman_shade(): named struct initializationDaniel Eklöf2021-05-17-1/+1
| |
| * box-drawing: fix typo: missing ‘.’ in struct member initializationDaniel Eklöf2021-05-17-1/+1
| |
| * box-drawing: shades can now be rendered either using solid color, or checker boxDaniel Eklöf2021-05-17-21/+51
| | | | | | | | | | For now, switching is done using a static variable. In the future, this could be a user option.
| * box-drawing: temporary “fix” for LIGHT ARCs with a8 buffersDaniel Eklöf2021-05-17-1/+22
| | | | | | | | | | | | We don’t have a method to draw the arcs using pixman yet. Work around this by replacing the a8 buffer with an a1 buffer, and render the arcs using our old, non-antialiased, way.
| * box-drawing: swap amount of shade for LIGHT and DARK shadesDaniel Eklöf2021-05-17-2/+2
| | | | | | | | | | The DARK shade is the one most dense, and thus the one that looks brightest.
| * box-drawing: draw shades as “antialiased” blocksDaniel Eklöf2021-05-17-18/+36
| | | | | | | | | | | | | | | | When rendering to an a8 surface, render shades using “transparent” pixman rectangles. When these glyphs are composited with a color, the resulting look is the color, but darkened.
| * box-drawing: use pixman_image_fill_boxes() for rect()Daniel Eklöf2021-05-17-10/+2
| |
| * box-drawing: implement LIGHT diagonal lines using pixmanDaniel Eklöf2021-05-17-30/+52
| | | | | | | | Use trapezoids to rasterize the diagonal lines.
| * box-drawing: rect(): implement using pixmanDaniel Eklöf2021-05-17-7/+15
| | | | | | | | Use pixman_image_fill_rectangles() to render rectangles. Duh!
| * box-drawing: {h,v}line: implement using pixmanDaniel Eklöf2021-05-17-14/+20
| | | | | | | | | | | | | | | | Use pixman_image_fill_rectangles() to render horizontal and vertical lines. Despite the name, this *is* the appropriate function to use, since our lines *do* have a thickness, and thus *are* rectangles.
| * box-drawing: U+256C - BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL: add missing cornerDaniel Eklöf2021-05-17-1/+1
| | | | | | | | The inner corner, where the upper/left lines meet, were missing
| * box-drawing: include pixman image in the buffer we’re passing aroundDaniel Eklöf2021-05-17-2/+6
|/
* Merge branch 'reflow-performane-no-new-row-initialization'Daniel Eklöf2021-05-17-6/+17
|\ | | | | | | Part of #504
| * grid: reflow: free old rows as soon as we’re done with themDaniel Eklöf2021-05-17-3/+8
| | | | | | | | | | | | This reduces the memory cost of reflowing text, as we no longer needs to hold both the old and the new grid, in their entirety, in memory at the same time.
| * grid: reflow: don’t initialize newly allocated rowsDaniel Eklöf2021-05-17-3/+9
|/ | | | | | | | | | | | | We’re going to write to it immediately anyway. In most cases, *all* newly allocated, and zero-initialized, cells are overwritten. So let’s skip the zero-initialization of the new cells. There are two cases where we need to explicitly clear cells now: * When inserting a hard line break - erase the remaining cells * When done, the *last* row may not have been completely written - erase the remaining cells
* Merge branch 'font-scaling-factor-wrong'Daniel Eklöf2021-05-17-50/+22
|\ | | | | | | Closes #509
| * term: get rid of term->font_scale, use term->scale onlyDaniel Eklöf2021-05-17-22/+16
| | | | | | | | | | | | | | | | | | We only needed term->font_scale to be able to detect scaling factor changes (term->font_scale != term->scale). But, we already have the old scaling factor in all places where term_font_dpi_changed() is called, so let’s pass the old scaling factor as an argument instead.
| * changelog: fonts sometimes not being reloaded with the correct scaling factorDaniel Eklöf2021-05-17-0/+3
| |
| * render: simply check for an invalid (not set) scaling factorDaniel Eklöf2021-05-17-1/+1
| |
| * term: remove get_font_scale()Daniel Eklöf2021-05-17-39/+14
|/ | | | | | | | | | | | | | | | | | | | | | | get_font_scale() was used to get the new scaling factor when loading fonts. This was then compared to the last seen font scaling factor. If there was no difference, the fonts were not reloaded. The problem was, the initial term->scale was set differently. This sometimes led to term->scale=2, while get_font_scale() return 1. That meant, fonts were initially scaled by 2 (when dpi-aware=no). Later, when mapped on an output (and thus term->scale being set to 1), the fonts weren’t reloaded with the correct scaling factor since the cached term->font_scale value was already 1. Since term->scale always reflects the *new* scaling factor when term_font_dpi_changed() is called, use that directly, and remove get_font_scale(). Also rename the following functions: * font_should_size_by_dpi() -> font_size_by_dpi_for_scale() * font_size_by_dpi() -> font_sized_by_dpi() * font_size_by_scale() -> font_sized_by_scale()
* Merge branch 'reflow-performance'Daniel Eklöf2021-05-16-97/+171
|\ | | | | | | Part of #504
| * grid: reflow: qsort_r() is not portableDaniel Eklöf2021-05-15-11/+15
| | | | | | | | Replace with qsort() + global variable. Not thread safe!
| * grid: include <stdlib.h>, for qsort_r()Daniel Eklöf2021-05-15-0/+1
| |
| * grid: reflow: always run qsort_r(), handle rows == 0 in tp_cmp() insteadDaniel Eklöf2021-05-15-7/+5
| |
| * grid: take scrollback start into account when sorting the tracking points arrayDaniel Eklöf2021-05-15-9/+29
| | | | | | | | | | | | | | | | | | | | The row numbers in the tracking points are in absolute numbers. However, when we walk the old grid, we do so starting in the beginning of the scrollback history. We must ensure the tracking points are sorted such that the *first* one we see is the “oldest” one. I.e. the one furthest back in the scrollback history.
| * grid: fix 32-bit compilationDaniel Eklöf2021-05-15-2/+4
| |
| * grid: reflow: tag tracking point if-statements with likely/unlikelyDaniel Eklöf2021-05-15-5/+5
| |
| * grid: reflow: use a sorted array for tracking pointsDaniel Eklöf2021-05-15-27/+66
| | | | | | | | | | | | | | | | | | | | | | Instead of iterating a linked list of tracking points, for *each and every* cell in the old grid, use a sorted array. This allows us to step through the array of tracking points as we walk the old grid; each time we match a tracking point, we move to the next one. This means we only have to check a single tracking point for each cell.
| * render: set tracking point count to 0 if there’s no active selectionDaniel Eklöf2021-05-15-1/+1
| |
| * grid: reflow: no need to check for combining charactersDaniel Eklöf2021-05-14-21/+10
| | | | | | | | Since we no longer call wcwidth(), we don’t need the base character.
| * grid: don’t depend on wcwidth()Daniel Eklöf2021-05-14-41/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling wcwidth() on every character in the entire scrollback history is slow. We already have the character width encoded in the grid; it’s in the CELL_SPACERs following a multi-column character. Thus, when we see a non-SPACER character, that isn’t in the last column, peek the next character. If it’s a SPACER, get the current characters width from it. The only thing we need the width for, is to be able to print padding SPACERS in the right margin, if the there isn’t enough space on the current row for the current character.
| * term: rename CELL_MULT_COL_SPACER -> CELL_SPACER, and change its definitionDaniel Eklöf2021-05-14-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using CELL_SPACER for *all* cells that previously used CELL_MULT_COL_SPACER, include the remaining number of spacers following, and including, itself. This is encoded by adding to the CELL_SPACER value. So, a double width character will now store the character itself in the first cell (just like before), and CELL_SPACER+1 in the second cell. A three-cell character would store the character itself, then CELL_SPACER+2, and finally CELL_SPACER+1. In other words, the last spacer is always CELL_SPACER+1. CELL_SPACER+0 is used when padding at the right margin. I.e. when writing e.g. a double width character in the last column, we insert a CELL_SPACER+0 pad character, and then write the double width character in the first column on the next row.
| * grid: add compile-time define to enable timing of the reflow operationDaniel Eklöf2021-05-14-0/+17
| |
* | Merge branch 'vt-anywhere-fix2'Craig Barnes2021-05-16-3/+2
|\ \
| * | Update `term->vt.state` for each iteration of vt_from_slave() loopCraig Barnes2021-05-15-3/+2
| | | | | | | | | | | | Otherwise it may be stale when read by the anywhere() function.
* | | Merge branch 'sixel-dont-shrink-below-sra-size'Daniel Eklöf2021-05-16-6/+8
|\ \ \ | |_|/ |/| |
| * | sixel: don’t *ever* shrink image below its SRA sizeDaniel Eklöf2021-05-16-6/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | If the image was accompanied with a “Set Raster Attributes” (SRA) command, make sure we *never* shrink the image below the size specified in the SRA. Images are normally shrunk when their bottom rows are fully transparent. This enables sixels that aren’t a multiple of 6 to be emitted, without also emitting an SRA command. But if there *is* an SRA command, obey it. Verified against XTerm-367
* | Merge branch 'xdg-activation'Daniel Eklöf2021-05-14-17/+130
|\ \ | |/ |/| | | Closes #487
| * changeloge: xdg-activation supportDaniel Eklöf2021-05-14-0/+3
| |
| * ci: try switching the gitlab CI from alpine:latest -> alpine:edgeDaniel Eklöf2021-05-14-5/+5
| |
| * wayland: workaround epoll-shim defining the macro closeDaniel Eklöf2021-05-14-1/+1
| |
| * meson: add xdg-activation-v1.xml conditionallyDaniel Eklöf2021-05-14-3/+31
| | | | | | | | | | | | | | | | | | | | Only enable XDG activation when compiling against wayland-protocols 1.21. Older versions don’t have this protocol. When available, define HAVE_XDG_ACTIVATION. Make all usages of xdg_activation_v1 and xdg_activation_token_v1 conditional.
| * pgo: add wayl_win_set_urgent() stubDaniel Eklöf2021-05-14-0/+1
| |
| * wayland: set xdg activation token surface to our top-levelDaniel Eklöf2021-05-14-1/+3
| |
| * xdg-activation: initial support for setting urgency using XDG activationDaniel Eklöf2021-05-14-10/+89
|/
* Merge branch 'vt-anywhere-cleanup'Craig Barnes2021-05-13-201/+44
|\
| * vt: make anywhere() function return `term->vt.state` by defaultCraig Barnes2021-05-13-14/+14
| | | | | | | | | | Instead of passing a `default_return` parameter, which is always just the current state anyway.
| * vt: clean up handling of "anywhere" actionsCraig Barnes2021-05-13-201/+44
| |
* | Merge branch 'install-tweaks'Daniel Eklöf2021-05-13-5/+5
|\ \ | |/ |/|
| * INSTALL: fix an unclosed markdown quoteDaniel Martí2021-05-13-5/+5
|/ | | | | | | | While skimming this doc, I noticed that "-Dterminfo" wasn't rendering properly as it was lacking its closing backquote. While at it, tweak the Arch wiki link, as it redirects to replace /index.php with /title.