- set `MAN_KEEP_FORMATTING=1` and `MANPAGER=cat` for the man
command and handle overstriking in the terminal emulation.
- this approach works on macOS, linux, FreeBSD and OpenBSD
- apply infinite-height prior to winsize initialization.
- use `LESS_LINES` environment variable.
- use `PAGER=less -F` to make less quit at the end of the man page
The behavior follows this priority order:
1. reuse an existing window already displaying the buffer,
2. if shell-command-other-window is not set, use the current
window, otherwise
3. select the largest available non-active window.
4. split a new window if no sutiable window is found.
5. fall back to the current window if splitting fails.
- Add `popup-abort` command.
- Update caption and restore readonly when reusing popup buffer.
- Prevent bugs when changing from minibuf to popup window.
* improve block skipping:
- if starting inside a string or a comment, skip to the end of the
string or comment while balancing blocks
- otherwise skip string and comments when balancing blocks
- fix behavior on very long lines, eg: **highlight.pack.js**
* if a nesting error occurs, point and mark are set around the mismatched
delimiters. use C-x C-x to skip between them
* simplify `get_colorized_line()`
* add `cp_get_line()` to factorize code
* add `eb_peek_prevc()` to get previous codepoint without end offset
* improve documentation conciseness
* use `BC_REUSE | BC_CLEAR` to avoid killing the `*occur*` buffer
* this ensures the `*occur*` buffer stays current in windows that show it
* modify the `BC_CLEAR` semantics to imply `BC_REUSE`
* simplify calls: remove redundant `BC_REUSE` flag
- `shell_buffer_read_only` controls if the shell buffer should become
read-only and use pager-mode when not interactive
- `shell_mode_auto_interactive` controls if the shell interactive mode is
switched to and from automatically based on cursor movement commands
- disable auto interactive if region is highlighted
- fix crash bug in qe_register_emulation_bindings for "emacs" emulation
* decouple interactive mode from cursor position.
* clear readonly when entering interactive mode and
restore when leaving it.
* simplify navigation logic by removing offset-based toggling.
* set pager mode on interactive shell exit.
* check for active processes in shell buffers before reusing them,
and prompt the user to kill the running process to avoid leaving
it detached and unreachable.
fixes a race condition where pty data was lost on process exit.
The pid callback now flags the exit status, while `shell_read_cb`
handles the final teardown. This prevents truncation for
high-throughput processes.
* fix bug on screen resize with default dired layout
* fix resize bug: vertical layout changed when screen width was adjusted
* rename `update_split_ratio` as `compute_virtual_window_size`
* remove `update_all_split_ratios` and `restore_coordinate_from_ratio`
* recompute window size in more necessary places
* use character sizes for minimum window width/height
* show virtual window size in `describe-window`
* add `C-x V` binding for `shrink-window`
The `occur` command creates an `*occur*` buffer to show the matches in the current buffer.
If we used `occur` to search another string, then the old *occur* buffer was still there and our new search result were not shown. Killing buffer `*occur*` before creating a new one solves the problem.
In the signal handler for the signal SIGWINCH tty_term_resize, we call
tty_dpy_invalidate function. In this function, we change the screen_size
and other critical fields.
While the process is executing the function tty_dpy_flush, and another
SIGWINCH occurs, then the screen_size is changed. And tty_dpy_flush will
access invalid memory which leads to coredump.
In the signal hander of SIGWINCH, we only need to set the flag
complete_refresh.