* add `BF_ERROR` to identify error source buffers and use it with `next-error`.
* show `HELP` and `ERROR` buffer flags in `describe-buffer`.
* add a dedicated compilation mode with the following bindings:
* `next-error` on `n`, `M-n`
* `previous-error` on `p`, `M-p`
* `scroll-up` on `SPC`
* `scroll-down` on `DEL`
* `search-forward` on `/`
and the following new commands:
* `goto-error` on `RET`, `LF`
* `kill-compilation` on `C-c C-k`
* use `compilation` mode instead of `pager` mode for
`do-compile`, and switch interactive shell buffers to
`compilation` mode when the shell exits (if `shell_buffer_read_only` is set)
* refine popup/sidepane closing in `next-error`:
* remove unnecessary popup check, as the command cannot
be invoked if a popup window is present.
* use `do_delete_window` to close side pane to avoid
screen gap bug with `edit_close`.
* fix dictionary sort to no longer ignore digits
* sort bindings in natural order
* improve `wall-chart` command: show overridden bindings with style
* add `describe-prefix-bindings` for a list of bindings with a common prefix
* add `describe-C-h`, `describe-C-c`, `describe-C-x`...
* rename and pass flags to byte quoting functions:
`byte_quote` -> `strquote_byte`
* add `eb_print_style` to output data to a buffer in a given style
* add `eb_print_field` to output a field name and value using styles
* use styles in describe commands
* improve byte stats and page layout output in `describe-buffer`
* add `wall-chart` command (sorted list of bindings)
* add `describe-help` command
* add `#` at the beginning of the comand argument description
to disable command when current window is a popup or the minibuf
* update command definitions
* parse process output for shell prompts with current directory
* parse `make -w -C` output for temporary subdirectory excursions
* handle property type and flags separately
* add `QE_PROP_MARK` to prevent offset update at range boundary
* use `QE_PROP_DUP` to optimize buffer properties with single allocation
* use mask in `eb_delete_properties` to delete tags selectively
* fix `eb_find_property` range glitch
* fix offset tracking for CWD properties
* simplify default directory selection for shell commands
* fix compiler warnings on variable shadow definitions
* optimize `next_error()`: no lookback needed anymore
* display buffer properties in `describe-buffer`
* update TODO.md
* improve color combining code for diff/patch output: preserve code
syntax coloring on red or green background.
* improve `curline_style` handling (needs more work)
* add `QETermStyle` transparent color handling in `apply_style`
* highlight trailing blanks in a single place
* transpose `qe_term_get_style()` arguments for consistency
* add `qe_term_style_string()` and `qe_styledef_string()`
* extend style string parser to accept missing foreground color
* fix bug on character constants ('(' ...) when styles are disabled
* fix end of comment/regex detection when scanning strings
* handle double escapes: "\\\"" is a 2 character string
* stop scanning when reaching outer block boundary
* scan blocks of comments as a single entity
* `compare-windows` used to toggle all ignore flags if invoked without
an argument. This was bogus.
* when reading a variable name (eg: `eval-expression`), improve alignment
of variable descriptions in popup window
- ensure stopping at the precise boundary between adjacent strings/comments
separated by spaces.
- bypass bracket balancing inside strings or comments.
- prioritize bracket skipping inside comment/string when starting at a bracket.
- prioritize string skipping when starting at a quote.
* add `eb_put_filename()` to encode buffer or file names with
non-ASCII characters according to PF_xxx flags
* add `CF_SAVE_LIST` flag for completions to store the list
of matches in `MinibufState`
* fix bufed and dired layout issues
* fix buffer and filename completion popup layout
* add commands to control display of Unicode and non printing
charcaters in buffer or file names:
- U toggles unicode display
- \ cycles through 4 possible encodings: ? ^J \x10 \010
* use `(*fp)()` syntax for indirect function calls
* 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
* 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`
- rename `edit_new` as `qe_new_window`
- report error in `qe_new_buffer` and `qe_new_window` upon failure
- rename `qe_find_buffer_file` as `qe_find_buffer_filename`
- rename `read_charset` as `qe_parse_charset`
- reset yank buffer references in `eb_clear()`
- make `qe_init()` return error code and abort upon error
* Fix `put_status`/`put_error` behavior
- use `put_error` instead of `put_status` for command errors
- prevent status message output to console during initialization
- use `put_error` for side effects in command errors
- add `&` prefix in status messages to force screen flush
- flush screen in `qe_display()`, remove redundant calls to `dpy_flush`
- fix gcc compilation errors and warnings
- remove most references to `global_screen`
- free font cache before closing the screen
- prevent mouse handling upon focus detection
* drop CI on macos-12
- rename `indent_size` window field as `indent_width` for consistency
- handle negative argval in `do_tabulate`
- fix reverse region in `indent-rigidly`
- only indent lines that start in the region, ie: lines whose beginning
offset >= start and < end
- fix `do_backspace` to delete a TAB worth of white space after TAB.
no longer use `undo` for this.
- fix `find_window` to locate window according to top-left corner of current
- add `unindent-region` on `M-C-|` to unindent current region
- add `unindent-buffer`
- redirect `S-RET` and `S-DEL` to their unshifted versions
- rename `c-indent-command` command as `c-indent-line-or-region`
- bumped VERSION to 6.2.1
- add `css_get_color_name()` to get the name or hex spec for a color
- display style details in style completion window
- add `insert-color` command on `C-c #` to convert color names to hex strings
- fix missing intializers in `scale_cube6[]`
- improve grey/gray aliasing
- add color parser for XParseColor hex syntax rgb:rrrr/gggg/bbbb
- add `tests/reset-term-palette.sh` to reset the terminal color palette to
default values.
- document style bits in 16, 32 and 64-bit style models
- add `color_y(QEColor)` to compute the weighted light value
- publish `color_dist()`
- add `colors_init()` to initialize color support structures
- improve list of named colors:
* use CSS color names
* add X11 color names
* make grey a generic synonym for gray
- improve `qe_color_map` using ramp lookup arrays
- fix `qe_unmap_color()` bug on 4K color cube
- add custom palette to store extra named user defined colors
- improve `css_lookup_color()` and `css_get_color()`
- enumerate palette entries on `p` and `#`
- improve color scripts in `tests/`
- add `tests/getpalette.sh` to dump the current terminal palette colors
- add `tests/term-palette.sh` to compare palette colors and rgb colors
* list extra commands separately (commands with matches in description only)
* colorize variable names
* fix tab-width computation to keep bindings aligned
* add buffer functions:
int eb_skip_whitespace(EditBuffer *b, int offset, int dir);
int eb_skip_blank_lines(EditBuffer *b, int offset, int dir);
int eb_skip_paragraphs(EditBuffer *b, int offset, int n);
int eb_next_sentence(EditBuffer *b, int offset);
int eb_prev_sentence(EditBuffer *b, int offset);
int eb_skip_sentences(EditBuffer *b, int offset, int n);
* modify paragraph selection method.
* improve paragraph commands
* add paragraph commands:
- `fill-region`, `fill-buffer`, `fill-region-as-paragraph`
- `backward-kill-paragraph`
* add sentence commands
- `backward-kill-sentence`, `backward-sentence`, `forward-sentence`,
- `kill-sentence`, `mark-end-of-sentence`
* add transpose commands:
- `transpose-paragraphs` and `transpose-sentences`
* `delete-leading-space`: Delete any leading whitespace on the current line
* `delete-trailing-space`: Delete any trailing whitespace on the current line
* `delete-trailing-whitespace` Delete all the trailing whitespace across the current buffer.
These commands handle the region if highlighted
* add `find_indent` and `make_indent` ancillary functions
* add `untabulate` on `S-TAB` to remove one indentation level
* rename `do_tab` as `do_tabulate` for consistency
* `tabulate` indents the region one level if visible
* add `indent-rigidly` commands: indent block interactively
* pass const `char32_t` array and `QETermStyle` array to `ColorizeFunc`
* add `cp_colorize_line()` wrapper to call colorizer function on null
terminated buffer.
* remove unused `EditBuffer` colorize fields
* remove `EditState` field `colorize_func`: rely on `colorize_mode` only
* no longer combine style into codepoint buffer.
* remove `STYLE_BITS`, `STYLE_SHIFT`, `CHAR_MASK`
* rename `set_colorize_func` as `set_colorize_mode`
* rename `SET_COLOR` and `SET_COLOR1` as `SET_STYLE` and `SET_STYLE1`
* add documentation for buffer API functions
- add `repeat` command on `C-x z`
- add `repeat-mode`, always enabled
- cycle all matching tags in current file on `goto-tag` and `find-tag`
- set up `repeat-mode` for these commands:
- `undo` on `C-x u` (`u` repeats `undo`, `r` performs `redo`)
- `undo` on `C-x r` (`r` repeats `redo`, `u` performs `undo`)
- `find-window-left`, `find-window-right`, `find-window-up`, `find-window-dow`
repeat navigation on `up`, `down`, `left`, `right`
- `next-error`, `previous-error`: `M-n` and `M-p` repeat in corresponding direction
- `next-buffer`, `previous-buffer: repeat buffers nagivation with `left` and `right`
- `enlarge-window` / `shrink-window`: repeat resizing on `^`, `v`, `{`, `}`
and cursor movement keys
- `goto-tag` on `C-x ,` goto next tag with `,` and `.`
- `call-last-kbd-macro` on `C-x e`: repeat macro on `e`
- add `eb_count_buffers` and `eb_get_buffer_from_index` for safe buffer navigation
- add transient bindings, known as repeat maps in GNU emacs
- pass `KeyDef **lp` (aka key maps) instead of mode for binding commands
- replace `do_next_buffer` and `do_prevous_buffer` with repeatable command
`do_buffer_navigation`
- fix `bufed_select` crash bug when selecting buffer from a regular window
*equivalents* are strings that should compare equal in a `compare-windows`
session. You can define such strings in a **.qerc** file in the directory of
one of the files being compared. This helps ignoring known changes such as
type of function renaming... Here is an example to help compare files between
the `bellard/quickjs` and the `quickjs-ng/quickjs` repositories:
```
define_equivalent("JS_DupValue(ctx, ", "js_dup(");
define_equivalent("JSValue", "JSValueConst");
define_equivalent("JS_NewInt32(ctx, ", "js_int32(");
define_equivalent("JS_NewInt32(ctx,\n", "js_int32(");
define_equivalent("JS_NewUint32(ctx, ", "js_uint32(");
define_equivalent("JS_NewUint32(ctx,\n", "js_uint32(");
define_equivalent("JS_NewBool(ctx, ", "js_bool(");
define_equivalent("JS_NewFloat64(ctx, ", "js_float64(");
define_equivalent("JS_EXTERN ", "");
define_equivalent("JS_EXTERN JS", "JS");
define_equivalent("JS_EXTERN JS_", "JS_");
ignore_equivalent = 1;
```
Other changes were necessary for proper utf8 skipping:
- add `utf8_prefix_len(str1, str2)` to compute the length of a common initial
prefix not falling inside UTF-8 encoded codepoints.
- add `utf8_decode_prev` to get the previous codepoint
- add `eb_match_str_utf8_reverse`