aboutsummaryrefslogtreecommitdiff
path: root/window-copy.c
Commit message (Collapse)AuthorAge
* Change searching to behave more like emacs and so that regex searchingnicm2020-08-05
| | | | doesn't overlap when searching forwards.
* Handle padding cells correctly when searching, GitHub issue 2301.nicm2020-07-15
|
* Correctly move to previous line when looking for previous word, fromnicm2020-06-16
| | | | Derry Jing.
* Add some formats for search in copy mode (search_present, search_match).nicm2020-06-11
| | | | GitHub issue 2268.
* Now that we mostly only search visible text, the rate limit on repeatingnicm2020-06-05
| | | | search does not seem to be necessary, remove it for the moment.
* Search marks outside the visible text are not useful, so there is nonicm2020-06-04
| | | | | point in allocating a big buffer to store them - just allocate the visible text size, and ignore any outside.
* Some improvements to performance of searching:nicm2020-06-04
| | | | | | | | | | | | | | - Do not allow searches to be repeated at intervals of less than 50 milliseconds, to prevent a huge queue of repeat key presses blocking up everything for ages. - If the search text hasn't changed, the match count can't have changed and there is no need to do a full search, so only search the visible text. This includes both scrolling and repeating the search. - Do not redraw twice when jumping to the search location. GitHub issue 2258.
* Make the -no-clear command variants not clear the search marks either.nicm2020-06-04
|
* Missing ; in previous.nicm2020-06-02
|
* Fire copy-pipe command even if there is no text, means it works if itnicm2020-06-02
| | | | has side effects.
* Use CLOCK_MONOTONIC for timer measurement and add a timestamp to controlnicm2020-06-02
| | | | mode %output blocks.
* Tidy up new UTF-8 code and make it more generic.nicm2020-05-25
|
* Do not attempt to divide by zero when working out copy position.nicm2020-05-25
|
* Instead of storing all UTF-8 characters in the extended cell which meansnicm2020-05-25
| | | | | | | that 14 bytes are wasted for each character in the BMP, only store characters of three bytes or less in the cell itself and store others (outside the BMP or with combining characters) in a separate global tree. Can reduce grid memory use for heavy Unicode users by around 30%.
* Add a mark in copy mode. Set with set-mark command (bound to 'X') bynicm2020-05-16
| | | | | | | | default and the mark and cursor position are swapped with 'jump-to-mark' (bound to M-x). The line containing the mark is shown in copy-mode-mark-style with the horizontal position in reverse. From Anindya Mukherjee in GitHub issue 2209.
* Do not loop forever when search finds an empty match, GitHub issue 2203.nicm2020-05-16
|
* Fix next-matching-bracket logic, from Chris Barber.nicm2020-05-16
|
* Store and restore cursor position when copy mode is resized, fromnicm2020-05-16
| | | | Anindya Mukherjee.
* Try to search the entire history first for up to 200 ms so a searchnicm2020-05-16
| | | | count can be shown. If it takes too long, search the visible text only.
* Do not hoke into struct window_pane from the tty code and instead setnicm2020-05-16
| | | | | | | everything up in tty_ctx. Provide a way to initialize the tty_ctx from a callback and use it to let popups draw directly through input_parse in the same way as panes do, rather than forcing a full redraw on every change.
* Copy mode search improvements:nicm2020-05-16
| | | | | | | | | - Add styles for the search marking styles (copy-mode-match-style and copy-mode-current-match-style). - Show the current match (the one with the cursor on it) in a different style. - Copying without a selection will copy the current match if there is one.
* Drop having a separate type for style options and make them all strings,nicm2020-05-16
| | | | | | | | | | | | | | | | | which allows formats to be expanded. Any styles without a '#{' are still validated when they are set but any with a '#{' are not. Formats are not expanded usefully in many cases yet, that will be changed later. To make this work, a few other changes: - set-option -a with a style option automatically appends a ",". - OSC 10 and 11 don't set the window-style option anymore, instead the fg and bg are stored in the pane struct and act as the defaults that can be overridden by window-style. - status-fg and -bg now override status-style instead of trying to keep them in sync.
* Add extension terminfo(5) capabilities for margins.nicm2020-05-16
|
* Only trim blank lines when the source pane is not the target pane,nicm2020-04-20
| | | | otherwise the cursor moves which is a bit strange.
* Make sure the cursor position is still on screen after we have trimmednicm2020-04-17
| | | | empty lines. Also improve some log messages.
* Add a copy-command option and change copy-pipe and friends to pipe to itnicm2020-04-17
| | | | | if used without arguments, allows all copy key bindings to be changed to pipe with one option.
* Don't miss the last line off the screen when writing after resize, fromnicm2020-04-16
| | | | Anindya Mukherjee.
* Clear the selection and repeat the search on refresh same as resize.nicm2020-04-15
|
* Instead of fixing with the cursor position when the copied screen isnicm2020-04-15
| | | | | | created, resize it and let the resize/reflow code fix it up and return it. Solves various problems with cursor position and resizing when in copy mode. With Anindya Mukherjee.
* Leave the cursor above empty lines.nicm2020-04-14
|
* Adjust cursor and scroll positions when entering copy mode so that thenicm2020-04-14
| | | | | cursor line is still visible even if the source and target panes are different heights.
* Make client -c and -t handling common in cmd-queue.c and try to benicm2020-04-13
| | | | | clearer about whether the client is the target client (must have a session) or not.
* Now that copy mode copies the pane content rather than keeping anicm2020-04-10
| | | | | | | | | | reference to it, it isn't necessary that the pane in copy mode is the same as the one copying from. Add a -s flag to copy-mode to specify a different pane for the source content. This means it is possible to view two places in a pane's history at the same time in different panes, or copy from a pane's history into an editor or shell in the same pane. From Anindya Mukherjee.
* Fix history-bottom to use the right line when working out the length.nicm2020-04-09
|
* Some minor style nits.nicm2020-04-09
|
* Some unnecessary assignments and unused variables.nicm2020-04-09
|
* Change copy mode to make copy of the pane history so it does not need tonicm2020-04-06
| | | | | | freeze updates (which does not play nicely with some applications, a longstanding problem) and will allow some other changes later. From Anindya Mukherjee.
* Check previous line rather than an extra line, from Anindya Mukherjee.nicm2020-04-03
|
* Only search the visible part of the history when marking (highlighting)nicm2020-04-02
| | | | search terms, much faster than searching the whole history.
* Add a 10 second timeout to prevent searches taking too much time, fromnicm2020-04-01
| | | | Anindya Mukherjee.
* Do not go down the regex search path (which is expensive because we neednicm2020-04-01
| | | | | | to convert the grid data into a string for regexec and reverse it to find the grid position) if the search string does not contain any regex special characters.
* Use a comparison to check for wrap and avoid an expensive modulus.nicm2020-04-01
|
* Performance improvements for regex searching, most notably:nicm2020-04-01
| | | | | | | | | | | | | - Use the grid data directly instead of copying it. - Special case the most typical one byte character cells and use memcmp for multiple bytes instead of a handrolled loop. - Hoist regcomp out of the loop into the calling functions. GitHub issue 2143. Also a man page from from jmc@.
* Do not go down the regex search path (which is expensive because we neednicm2020-04-01
| | | | | | to convert the grid data into a string for regexec and reverse it to find the grid position) if the search string does not contain any regex special characters.
* Use a comparison to check for wrap and avoid an expensive modulus.nicm2020-04-01
|
* Performance improvements for regex searching, most notably:nicm2020-04-01
| | | | | | | | | | | | | - Use the grid data directly instead of copying it. - Special case the most typical one byte character cells and use memcmp for multiple bytes instead of a handrolled loop. - Hoist regcomp out of the loop into the calling functions. GitHub issue 2143. Also a man page from from jmc@.
* Add non-regex search variants to avoid the performance cost for peoplenicm2020-03-31
| | | | with large histories or long lines.
* Set end position correctly, GitHub issue 2129 from Anindya Mukherjee.nicm2020-03-21
|
* Fix select-word when not on a word, from Anindya Mukherjee.nicm2020-03-20
|
* Make the mouse_word and mouse_line formats work in copy mode and enablenicm2020-03-20
| | | | the default pane menu in copy mode.