Commit graph

168 commits

Author SHA1 Message Date
huwwa
053871bec7 Pager: verify existance of last buffer on abort 2026-05-17 00:03:01 +02:00
Charlie Gordon
e84394a8bb navigation: improve forward-block / backward-block
* 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
2026-05-14 16:13:16 +02:00
Charlie Gordon
5a37c1cbc3 occur: reuse the same buffer but clear contents
* 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
2026-05-11 19:16:05 +02:00
4g4
ded51b934f
feature: Add back-to-indentation command (#98)
Move point to the first non-whitespace character on this line.
2026-04-30 15:43:28 +02:00
Charlie Gordon
43b5851958 Update README.md, VERSION and copyrights
* VERSION bumped to 6.4.1
2025-02-10 07:51:29 +01:00
Charlie Gordon
4964b9fded Fix memory leaks
* fix bug in `eb_free` where log and style buffers were not freed
* free minibuffer history list
* free css symbols when finalizing the graphics html viewer
2025-02-05 17:47:32 +01:00
Charlie Gordon
e0ba872d77
Improve error reporting (#50)
- 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
2024-12-08 19:43:26 +01:00
Charlie Gordon
f674419e75
Fix put_status/put_error behavior (#47)
* 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
2024-12-03 22:52:55 +01:00
Charlie Gordon
e3c5bfd457
Remove references to global qe_state (#45)
* Remove references to global `qe_state`

Add `QEmacsState *qs` field in context and object structures:
- `QEditScreen`, `EditState` (renamed from `qe_state`), `QuitState`
- `WinWindow` (win32.c), `X11State` (x11.c), `QEArgs` (cmd line arguments)
- `CmdLineOptionDef::func_arg()`, `QEModeData`
- move `QEKeyContext` to `QEmacsState`

Pass `QEmacsState *qs` to configuration and state functions:
- all `module_xxx_init` and static `xxx_init` functions
- `QEDisplay::dpy_init()`, `qe_register_display()`, `screen_init()̀`
- `load_input_methods()`, `unload_input_methods()`
- `register_input_method()`, `find_input_method()`
- `find_resource_file()`, `open_resource_file()`
- `qe_find_current_binding()`, `qe_list_bindings()`
- `qe_register_mode()`, `qe_find_mode()`, `qe_find_mode_filename()`
- `qe_register_cmd_line_options()`, `set_user_option()`, `set_tty_charset()`
- `qe_register_commands()`, `qe_register_bindings()`, `qe_find_cmd()`
- `qe_register_completion()`, `qe_register_variables()`
- `eb_register_data_type()`, `parse_command_line()`
- `eb_trace_bytes()`, `qe_toggle_control_h()` (split from `do_toggle_control_h()`)
- `unget_key()`, `qe_grab_keys()`, `qe_ungrab_keys()`, `qe_key_process()`
- `eb_new()`, `eb_find()`, `eb_find_new()`, `eb_scratch()`, `eb_find_file()`
- `new_shell_buffer()` `macro_add_key()`, `clear_macro(), `stop_macro()`
- `check_window()`, `check_buffer()`, `qe_kill_buffer()`, `qe_get_history()`
- `qe_register_charset()`, `find_charset()`

Add error message handlers:
- add `QEDisplay::dpy_error()` method
- add `qe_cfg_error()`, use for all expression parsing errors
- pass opaque pointer to `css_error()`
- add `qe_put_error()` and `qe_dpy_error()`

Add context argument:
- always pass a non-null window pointer to `do_refresh()`, `new_help_buffer()`

Rename functions:
- `find_resource_file` -> `qe_find_resource_file`
- `open_resource_file` -> `qe_open_resource_file`
- `input_methods_init` -> `qe_input_methods_init`
- `load_input_methods` -> `qe_load_input_methods`
- `unload_input_methods` -> `qe_unload_input_methods`
- `find_input_methods` -> `qe_find_input_methods`
- `register_input_method` -> `qe_register_input_method`
- `parse_command_line` -> `qe_parse_command_line`
- `eb_trace_bytes` -> `qe_trace_bytes`
- `eb_init` -> `qe_data_init`
- `eb_count_buffers` -> `qe_count_buffers`
- `eb_get_buffer_from_index` -> `qe_get_buffer_from_index`
- `init_all_modules` -> `qe_init_all_modules`
- `exit_all_modules` -> `qe_exit_all_modules`
- `load_all_modules` -> `qe_load_all_modules`
- `maybe_set_mark` -> `do_maybe_set_mark`
- `unget_key` -> `qe_unget_key`
- `minibuffer_init` -> `qe_minibuffer_init`
- `edit_display` -> `qe_display`
- `new_yank_buffer` -> `qe_new_yank_buffer`
- `new_shell_buffer` -> `qe_new_shell_buffer`
- `shell_find_mode` -> `qe_shell_find_mode`
- `save_selection` -> `qe_save_selection`
- `register_emulation_bindings` -> `qe_register_emulation_bindings`
- `macro_add_key` -> `qe_macro_add_key`
- `clear_macro` -> `qe_clear_macro`
- `stop_macro` -> `qe_stop_macro`
- `eb_format_message` -> `qe_format_message`
- `screen_init` -> `qe_screen_init`
- `charset_jis_init` -> `qe_charset_jis_init`
- `charset_more_init` -> `qe_charset_more_init`
- `check_window` -> `qe_check_window`
- `check_buffer` -> `qe_check_buffer`
- `eb_find_file` -> `qe_find_buffer_file`
- `eb_find` -> `qe_find_buffer_name`
- `eb_new` -> `qe_new_buffer`
- `eb_find_new` -> `qe_new_buffer` with `BC_REUSE`
- `eb_scratch` -> `qe_new_buffer` with `BC_REUSE | BC_CLEAR`
- `find_charset` -> `qe_find_charset`

Add asan, msan and ubsan targets
Fix `qe_encode64` buffer length computation.
Add `qe_new_shell_buffer` flags `SF_REUSE_BUFFER` and `SF_ERASE_BUFFER`
Bumped version to 6.3.3
fix redundant typedef
fix compilation errors
2024-12-01 23:34:00 +01:00
Charlie Gordon
217f2d50c9 Make trace flags more generic
- add `QETraceDef qe_trace_defs[]` and `qe_trace_defs_count` to enumerate
  flags and flag names
- use this for all trace commands instead of explicit tests
- add traces for mouse and clipboard events
2024-10-11 09:14:16 +02:00
Charlie Gordon
ad69d01541 Add xterm clipbord support
- add `qe_encode64` and `qe_decode64` utility functions
- add command line option --clipboard to enable/disable tty clipboard support
- add `clipboard` trace option
2024-10-11 09:14:16 +02:00
Charlie Gordon
6a35bc268a Add xterm tty mouse support
- add command line option -m:X to configure mouse support
- add `mouse` trace option
2024-10-11 09:14:16 +02:00
Charlie Gordon
7a94d82d6c Fix some terminal encoding issues
- fix `buf_put_key()` for control keys
- add command line argument -mk=X  for xterm modifyOtherKeys setting (0,1,2)
- improve argument parsing to avoid seg fault on bogus arg spec
- report command line argument errors in popup window
- improve escape sequence handling in tty.c
- support bogus iTerm2 encoding of option/command/control key combinations
2024-09-25 01:02:14 +02:00
Charlie Gordon
288eeb450e Improve modern terminal support
- improve ANSI tty and shell buffer escape sequence parser
- detect backspace/delete input setting from termios structure
- renumber special keys, remove redundant definitions
- handle shift state modifiers generically
- support tty `modifyOtherKeys` key encoding
- support tty `CSI u` key encoding
- simplify x11 key handling
- simplify haiku key handling (untested)
- bump VERSION to 6.3.1
- rename `insert-color` as `read-color`, insert code on `C-u C-c #`
- simplify string to key conversions
- improve CSI and OSC sequence support (ESC ] ... ^G or ST)
- `do_toggle_control_h()` should just toggle `ts->term_flags & KBS_CONTROL_H`
2024-09-25 01:02:14 +02:00
Charlie Gordon
00131d44d1 fix cast and comment 2024-09-07 18:40:44 +02:00
oguillaumin
5bef7b771f Add state and buffer fields
* add `b->ref_count`
* add `b->qs` pointer
* add `qs->first_hidden_window`
* handle both window lists in `edit_detach()`
2024-08-31 13:49:00 +02:00
oguillaumin
f44d9bdf74 Add multiline cursor editing
- add `swap_int()`
- add commands for multi-line cursor:
  * `start-multi-cursor` on `C-x <`
    set the mark for a region with a cursor on each line
  * `end-multi-cursor` on `C-x >`
    end recording the multi-line cursor region and start editing
    cancel the multi-line cursor with `C-g`
  * `add-multi-cursor` on `C-x #`
    add an extra cursor at point. Activate multi-line cursor editing
    with `C-x \`
  * `activate-multi-cursor` on `C-x \`
    start multi-line cursor editing. Stop with C-g.
- UX is tentative, more work needed based on usage.
2024-08-31 13:49:00 +02:00
oguillaumin
ee2e3c767b Colorize lines up to 16 MB
- add `eb_get_line_length()`
- move `buf` and `sbuf` to `QEColorizeContext`
- reallocate line and style buffers on long lines
2024-08-31 13:49:00 +02:00
oguillaumin
494ea38c33 Improve memory allocation APIs
- replace `qe_malloc_dup()` with `qe_malloc_dup_bytes()` and `qe_malloc_dup_array()`
- replace `qe_realloc()` with `qe_realloc_bytes()` and `qe_realloc_array()`
- pass numbers of objects to `qe_malloc_dup_array` and `qe_realloc_array`
- add `qe_strndup()`
2024-08-31 13:49:00 +02:00
Charlie Gordon
7b803ace0e Improve syntax coloring APIs
* 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
2024-07-28 00:00:03 +02:00
Charlie Gordon
4be625f5c4 Improve macro handling
* add `macro-counter` variable
* add `QEState` fields `nb_macro_keys_run`, `macro_counter`, `macro_format`.
* add `int find_key_suffix(const char *str, char c)`
* pass `argval` to `do_call_last_kbd_macro` to handle early exit
* add `clear_macro`, `stop_macro`
* add `int check_format_string(const char *fmt, const char *template)`
* do not use `alloca` for `eb_vprintf`
* add `dbuf_str(db)`: null terminate the buffer and return a string pointer.
* add macro commands:
  `edit-last-kbd-macro`, `name-last-kbd-macro`, `insert-kbd-macro`,
  `read-kbd-macro`, `macro-add-counter`, `macro-set-counter`,
  `macro-insert-counter`, `macro-set-format`
* `start-keyboard-macro` restarts macro learning mode if learning already
* add documentation on macro commands
* stop macros upon errors (when ringing the bell)
* stop macros if prompting the user for confirmation
2024-07-28 00:00:03 +02:00
Charlie Gordon
6e2b6e24c2 Add eb_add_tag()
* add `eb_add_tag(b, offset, name)`:
  * check for duplicate definitions
  * duplicate string argument
* use `ab_add_tag()` instead of `eb_add_property()` from language colorizers
* fix `get_js_identifier()` for `c == 0` case.
2024-07-28 00:00:03 +02:00
Charlie Gordon
e0d9a641d3
Add repeat-mode (#34)
- 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
2024-05-25 23:37:05 +02:00
Charlie Gordon
ceb6b3370f
Add *equivalents* for compare-windows (#27)
*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`
2024-05-19 21:16:37 +02:00
Charlie Gordon
a388a95305
Pass QEmacsState pointer to all module_init and module_exit functions (#24) 2024-05-19 19:15:08 +02:00
oguillaumin
f36144d6a8 Change license to MIT
* bumped VERSION to 6.0.0
2023-03-05 02:04:02 +01:00
Charlie Gordon
2231ae93f6 Improve qscript language and support
* add multi-line strings with """ syntax and escaped newlines
* call commands with allocated string arguments instead of local arena
* improve triple quoted string support in C like colorizers
* increase SEARCH_LENGTH to 2K (should use allocated arrays)
* fix kill-matching-lines definition
* fix utf8_to_char32 implementation inconsistency for empty destination
* fix buffering errors in eb_insert_utf8_buf() and eb_insert_char32_buf()

* bump version to 5.4.1e
2022-11-22 23:21:28 +01:00
Charlie Gordon
d0f7b7a904 Various improvements for consistency
* add -Wno-packed compiler option
* add CONFIG_REGEX flag, undefined for tiny build
* disable regex commands in tiny build
* add documentation for some search commands and APIs
* reorder search tags for readability
* add isearch_yank_char
* use emacs names for:
  isearch-repeat-backward, isearch-repeat-forward,
  isearch-ring-advance, isearch-ring-retreat,
  isearch-yank-word-or-char
* add occur alias for list-matching-lines
* add char32_to_utf8()
* restored some macros in cutils.h:
  likely(x), unlikely(x), __maybe_unused, BOOL, FALSE, TRUE
* remove max(), min(), maxp(), minp(), clampp()
* add typed arithmetic functions:
   min_int(), max_int(), clamp_int(), min3_int(), max3_int()
   min_offset(), max_offset(), clamp_offset()
* use typed functions everywhere

* bump version to 5.4.1d
2022-11-21 00:20:18 +01:00
Charlie Gordon
138be0a3ca Improvements in search functions
* eb_get_region_contents and eb_get_contents take an extra argument
  encode_null to encode embedded null bytes as "\xC0\x80"
* use steps instead of flags for isearch state array:
  max 256 code points, 512 steps and 768 search bytes
* add remove_string() to remove a string from a StringArray and pack the array
* rename get_history() as qe_get_history() and make it public
* prevent multiple registration of command tables in qe_register_commands()
* silence compiler warning on array size in charname_complete()
* remove last_search_u32 data, use search history list instead
* restrict search commands to the current region if highlighted

* bump version to 5.4.1b
2022-11-11 15:45:49 +01:00
Charlie Gordon
60390867ae Use wide char specific classification and case functions
* qe_toupper and qe_tolower handle only ASCII subset
* add qe_wtolower() and qe_wtoupper() for Unicode case conversions
  current implementation is partial
* handle accents in qe_wtolower() and qe_wtoupper() only
* add qe_iswalpha(), qe_iswlower() and qe_iswupper()
* restrict filename lowercasing kludge in reduce_filename()
* restrict qe_findchar() and qe_indexof() to ASCII subset
* rename functions:
   eb_match_str  => eb_match_str_utf8
   eb_match_istr => eb_match_istr_utf8
   strimatch_pat => utf8_strimatch_pat
   ustr_get_word => utf8_get_word
   wctoupper     => qe_wctoupper
   wctolower     => qe_wctolower
   strimatch_pat => utf8_strimatch_pat
   str_get_word  => str_get_word7
* handle accented letters in buffer casing functions
2022-11-01 01:19:32 +01:00
Charlie Gordon
7e70e611b6 Use char32_t for all code point variables and arrays
- char32_t is defined in cutils.h but may conflict with <uchar.h>
- all qe_isxxx functions take a char32_t
- add etf8x encoding for full range of char32_t type
- add utf8_decode_strict()
- add ustr_match_keyword()
- utf8_encode() / utf8_decode() handle up to 32 bits
- improve detect_charset():
  - detect utf8 and utf8x
  - avoid failure on partial utf8 sequence at end of buffer
  - detect overlong utf8 sequences
- fix display bugs for code points beyond MAX_UNICODE_DISPLAY
- simplify do_compare_windows(), avoid magic char values.
- rename functions:
    eb_encode_uchar -> eb_encode_char32
    eb_insert_uchar -> eb_insert_char32
    eb_insert_uchars -> eb_insert_char32_n
    eb_match_uchar -> eb_match_char32
    eb_delete_uchar -> eb_delete_char32
    eb_replace_uchar -> eb_replace_char32
    utf8_to_unicode -> utf8_to_char32
- use char32_t for all variables and arrays holding code-points
- fix some language syntax parsers.
- fix detect_eol_type_32bit(), used uint16_t instead of uint32_t
- bump VERSION to 5.4.0
2022-10-29 19:43:38 +02:00
Charlie Gordon
d1fb4dde64 Add macros for block comparison, copy and move
After spending a few hours debugging a stupid memcpy size error, I
decided to use a typed version of memcpy, memcmp and memmove wherever
the array type size is greater than 1.

- add blockcmp(p1, p2, n), blockcpy(p1, p2, n), blockmove(p1, p2, n)
  for operation on typed arrays
- add max_uint() and min_uint()
- bumped VERSION to 5.3.4w
2022-09-27 09:32:41 +02:00
Charlie Gordon
f8392d133b Improve describe-key-briefly, fix eb_printf
- fix prefix argument handling for describe-key
- echo prefix keys after "Describe key: " prompt
- move session commands to qe.c, remove them from tqe
- use byte_quote() in do_describe_buffer()
- use b->offset to track insertions in describe-xxx commands
- eb_putc(), eb_puts() and eb_printf() insert at `b->offset` instead of `b->total_size`
- do not use eb_write() in eb_trace_bytes()

- bump VERSION to 5.3.4p
2022-09-08 13:47:02 +02:00
Charlie Gordon
893653c71d Merge branch 'master' of github.com:qemacs/qemacs 2022-08-31 23:33:42 +02:00
Charlie Gordon
a4b9a58d2d Try and merge config file parsers
- add byte_guote() to encode a single byte
- encode non ASCII bytes in strquote()
- split function call parse and evaluation into qe_cfg_call() in tqe's parser.c
- use has_token() in full parser
- fix bogus function name in config file parsing errors
- bump VERSION to 5.3.4i
2022-08-31 22:26:38 +02:00
Clemmitt Sigler
d26a43e5d7 Eliminate gcc __builtin___snprintf_chk complaints (gcc version 12.1.1 20220730 (GCC)) 2022-08-31 08:59:39 -04:00
Charlie Gordon
465d30bea7 Simplify prefix argument handling
- move code to do_prefix_argument()
- more qe_ungrab_keys() to isearch_key()
  ungrabing should be based on grab function return value
- an explicit 0 prefix argument prevents command execution
  unless the command explicitly receives the prefix argument
- use code_letter in exec_command(), qe_get_prototype()
- bump VERSION to 5.3.4h
2022-08-31 01:05:36 +02:00
Charlie Gordon
4939f6e927 Fix overwrite mode issues
- rename s->insert as s->overwrite with opposite semantics
- fix overwrite mode behavior:
   TABs are filled, then removed
   TABs and newlines are always inserted
   backspace removes TABS and newlines
   backspace overwrite previous glyph with 1 or 2 spaces except at EOL
   backspace only replaces with spaces before a TAB to preserve layout
   quoted-insert always inserts
- quoted-insert inserts special key as escape sequences
- make KEY_UNKNOWN and KEY_NONE special keys matched by KEY_IS_SPECIAL()
- eb_replace() returns the number of bytes written
- add text_screen_width() to compute the actual screen column
- add convenient bindings for laptops with limited special keys:
  - overwrite-mode: C-c o
  - insert-mode: C-c i
  - toggle-read-only: C-c %
  - not-modified: C-c ~
- document set-visited-file-name
- remove filename if set-visited-file-name with an empty string
- simplify eb_insert_uchars()
- bumped version to 5.3.4e
2022-08-29 18:41:29 +02:00
Charlie Gordon
7aca319d3c Fix backspace behavior over wide glyphs
- add qe_iswide()
- add eb_next_glyph() / eb_prev_glyph()
- use a larger unicode_glyph_range_index[] array
- add s->cur_offset_hack to track when current position is in
  the middle of a wide glyph
- pass w to qe_term_overwrite(): erasing 1 or 2 positions
- erase partially overwritten wide glyphs
- remove qe_term_put_char()
- bumped version to 5.3.4d
2022-08-29 02:55:50 +02:00
Charlie Gordon
36d3644dbe Fix behavior on special glyphs
- add eb_skip_accents(), eb_skip_glyphs(), eb_delete_glyphs()
- overwriting a character with accents replaces it completely
- C-d deletes characters along with subsequent accents
- handle wide characters and accents in shell console
- handle repeated wide characters
- use Hex in trace_buffer for non-ASCII bytes
- bumped version to 5.3.4c
2022-08-28 20:28:40 +02:00
Charlie Gordon
0b61bbb0c5 fix gcc warning 2022-08-27 20:36:44 +02:00
Charlie Gordon
ee60fcd046 Improved TTY key decoding
- get_str() returns byte count
- add KEY_xxx definitions for SHIFT, CTRL and SHIFT+CTRL cursor keys
- allow KEY_META() for cursor and function keys
- add 'key' tracing option
- improve trace output readability
- add KEY_UNKNOWN for unrecognized TTY sequences
- add unknown-key command to display unknown key details
- add buf_encode_byte() to share code
- recognise M-ESC

Improve config file parsers:
- add full-version global variable for tests in config file
- no longer display configuration file errors in tqe
- recognise variable setting syntax in tqe
  handle tab-width, default-tab-width, indent-tabs-mode, indent-width

- bump VERSION to 5.3.4
2022-08-27 20:11:38 +02:00
Charlie Gordon
3bbee69742 Multiple improvements
improve command and bindings registration:
- simplify command and binding registration APIs
- add bindings member in ModeDef structures
- rename qe_register_cmd_table() as qe_register_commands(), change API
- add qe_register_bindings() taking mode, command-name and bindings string
- rename qe_mode_set_key() as qe_register_command_binding()

improve buffer listing:
- add BF_SHELL buffer flag for shell buffers
- show current directory of shell buffers in bufed

improve dired:
- add dired-hide-details-mode on "("
- use details_mask to control long listing

improve trace doctor:
- add EB_TRACE_DEBUG trace flag for debugging traces
- add do_set_trace_flags()
- change do_start_trace_mode() to do_toggle_trace_mode() with arg

misc:
- fix make_user_path() for pathnames without a trailing slash
- use separate commands for prefix_argument handling
- improve strstart(), strend(), pstrcpy(), pstrncpy(), get_dirname()
- add strmatchword() like strstart with check for word boundary
- bumped version to 5.3.3d
2022-08-22 17:13:26 +02:00
Charlie Gordon
4e5e42d2ea Colorize apropos window
- split eb_command_print_entry from command_print_entry
- split eb_variable_print_entry from variable_print_entry
- fix eb_sort_span to handle static styles
- match description strings in apropos
- use eb_xxx_print_entry in apropos to share code and colorization
- bumped version to 5.3.2d
2022-08-18 14:59:10 +02:00
Charlie Gordon
f7c1621ebb Improve paragraph handling
- simplify do_delete_blank_lines(), fix case of non blank line
- remove eb_start_paragraph()
- do_mark_paragraph() takes ARG_VAL, make emacs compatible
- simplify eb_prev_paragraph(), make emacs compatible
- improve fill_paragraph():
  compute actual indent size (handle TABs)
  compute actual word sizes (handle accents and double width glyphs)
- bumped version to 5.3.1j
2022-08-13 16:16:21 +02:00
Charlie Gordon
d052ab31ff Fix many compilation warnings for clang -Weverything
- made some local objects static
- fix many const cast issues
- fix comma operator warnings
- add const correct strtol_c(), strtoll_c(), strtold_c()
- add unconst(t) to override const removal warnings
- comment VLAs and flexible arrays
- use get_basename_offset() to enable const correct
  get_basename() and get_basename_nc()
- use get_extension_offset() to enable const correct
  get_extension() and get_extension_nc()
- always include config.h
- use size_t for some size arguments:
  umemmove(), umemcpy(), umemcmp(), qe_memicmp()
- add qe-doc.info and qe-doc.pdf targets
- fix shadowing bug in buf_write: used tor return 0 instead of byte count
- bumped version to 5.3.1e
2022-08-10 18:50:19 +02:00
Charlie Gordon
e08de03499 updated credits and copyrights 2022-08-03 17:00:38 +02:00
Charlie Gordon
b72b1773db Fix gcc compilation
- be more careful about snprintf target arrays
- fix bug in qe_load_file(): was testing local array instead of argument
- remove unused indent variable in clang.c
- pass pointer to CSSFile in css_close()
2022-08-03 16:47:12 +02:00
Charlie Gordon
e13fcfb543 remove trailing blanks 2020-10-21 15:01:52 +00:00
Charlie Gordon
d0b9f3dad4 bumped copyrights on modified files 2020-10-17 21:09:49 +00:00