Commit graph

129 commits

Author SHA1 Message Date
Charlie Gordon
8e3f3175a9 describe-screen: fix small issues in popup window
* fix layout and colors
* make hex values more explicit
2026-06-19 09:06:44 +02:00
Charlie Gordon
227c3dc5e8 Help: improve describe-xxx functions and help popups
* 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
2026-06-18 23:30:17 +02:00
Charlie Gordon
699bdff915 Simplify mode probing
* add `filenames` specification in `ModeDef` structures
* generic mode probing can match a list of filenames
* remove unneeded mode_probe functions
* this enables diff coloring on Makefile
2026-06-05 18:42:56 -04:00
Charlie Gordon
d6b37ca511 Sundries: bug fixes
* fix crash bug on `delete_equivalent()`: qe_free takes a double pointer
* remove unused ShellState variables
* initialize term structures
2026-05-18 01:15:21 +02:00
4g4
202f599e99 Revert "fix bottom right corner refresh"
This reverts commit e593c24afbfec00137bc47a8b89790b295d3db3c.
2026-04-30 15:38:40 +02:00
4g4
5526233480 fix bottom right corner refresh
This hack is only needed in old terminals. In modern terminals we do not
need this. Besides, removing this hack will refresh the bottom right
corner.
2026-04-30 15:38:40 +02:00
4g4
6cd79d45df bugfix: fix coredump when resizing terminal window
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.
2026-04-30 08:41:26 +02:00
Charlie Gordon
93fe952ab8 fix clang 17 compilation warnings 2026-03-14 21:33:53 +01:00
Charlie Gordon
d5200a06e6
Fix clipboard handling in Apple Terminal (#48)
- add clipboard handling method `2` using `pbcopy` and `pbpaste` on macOS
- use this method by default when running under macOS from the Apple
  Terminal. The last kill is copied to the system clipboard upon losing
  focus and the clipboard contents is retrieved and copied to a new kill
  buffer upon gaining focus.
2024-12-04 09:40:17 +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
d447da9ce0 Improve mouse support
Mouse:
- add `shift` state in all mouse events
- pass `QEmacsState *qs` to `qe_mouse_event`
- support non drag mouse events with `-m:2` command line option
- dragging beyond window borders generates scrolling events
  (should autorepeat, should have menu line at the top for scrolling up)
- cancel active search on mouse_goto
- do not mouse activate window if current active window is modal (popup or
  minibuf)
- handle double and triple click: select by words or lines
- handle shift click: extend selection
- add `EditState::mouse_down_offset` for initial dragging buffer offset
- pass `QEEvent *ev` to `mouse_goto()` handlers

events:
- add synthetic key events: QUIT CLOSE EXIT
- use synthetic events for GUI interaction (no longer simulate keystrokes)

tty:
- fix large OSC sequence support for terminal clipboard retrieval

Multicursor:
- use new `QECursor` for multicursor local states
- reallocate `multi_cursor` array in chunks

misc:
- add `eb_peekc(EditBuffer *b, int offset)`
- boolean cmdline options no longer require an argument, true if none provided
- int cmdline options either require an argument (CMD_LINE_INT_ARG) or take an
  optional argument, value is incremented if argument is not provided.
2024-11-10 00:44:20 +01:00
Charlie Gordon
ab86598e29 Automate modifyOtherKeys, mouse and clipboard support detection
- intialize `tty_mk`, `tty_mouse` and `tty_clipboard` to `-1` for automatic
- command line options force setting
- otherwise, configure support from environment variables (for now)
2024-10-11 09:14:16 +02:00
Charlie Gordon
ea7665dee9 New indenting commands
- 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`
2024-10-11 09:14:16 +02: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
0e90c18107 Add support for suspending qemacs
- add `suspend-qemacs` command
- add `dpy_suspend` QEDisplay method to handle suspending qemacs appropriately
- catch `SIGTSTP` and `SIGCONT` to adjust terminal state.
- add `qemacs-version` command
- bump VERSION to 6.3.2
2024-09-25 01:02:14 +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
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
3852fb9c19 Update copyrights 2024-07-28 00:00:03 +02:00
Charlie Gordon
84393d6c4f Add bell sounds
* add `QEDisplay::dpy_sound_bell`
* add `\007` prefix in `put_status` to sound bell
2024-07-28 00:00:03 +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
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
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
7b6b5ed1e3 Disable Unicode terminal version detection
- disable Unicode version detection and reporting
- bump VERSION to 5.3.4y
2022-10-04 14:59:21 +02:00
Charlie Gordon
1beb610d76 Update glyph width methodology
- rename unicode_tty_glyph_width() as qe_wcwidth()
- compute tables for qe_wcwidth() with tools/unicode_gen.c
  from the latest Unicode version
- add qe_wcwidth_variant() to determine if terminal may use
  incorrect width for a given glyph.
- reposition TTY cursor for glyphs with ambiguous width
- remove unicode_width.h
- add wcwidth.h and wcwidth.c generated by tools/unicode_gen.c
- update tools/unicode_gen.c and tools/unitable.c
- determine Unicode version support at start time
  displayed by describe-screen command
- display code point width and variant in what-cursor-position command (C-x ?)
- bumped VERSION to 5.3.4x
2022-09-27 22:30:05 +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
bd50376780 Various improvements
- add charset.h
- add tools/unitable.c to compute unicode_width.h
- add tools/unicode_gen.c to compute more unicode tables
- use Unicode 15.0.0
- add rules to compute width tables from Unicode tables and TTY
- move basic definitions from util.h to cutils.h
- use CONFIG_SESSION for session support (undefined if CONFIG_TINY)
- define CompleteFunc and CT_xxx flags for completion functions
- pass CompleteFunc to xxx_complete() functions
  this allows more generic implemetation, without including qe.h
- rename fill_border() as fill_window_slack() for readability
- add QELEVEL environment variable to detect recursive invocation
- use stricter parser for load_ligatures()
- bump VERSION to 5.3.4u
2022-09-19 15:16:59 +02:00
Charlie Gordon
e7c7a14400 Improve qescript parser and evaluator
- improve operator lexer: produce token and precedence on 1 step
- merge parser.c and qescript.c

Fix other bugs
- close display before freeing memory in --free-all
- free TTYState in tty_dpy_close()
- free VarDef memory in --free-all
- fix crash bug on --free-all due to duplicating ModeDef structures

Improve variable handling:
- move do_describe_variable() to variable.c
- add var_alloc and str_alloc flags in VarDef to fix `end` hack
- remove ugly kludge to detect allocated strings
- type variables retrieved from environment
- free variable data on --free-all

- bump VERSION to 5.3.4m
2022-09-05 20:27:48 +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
f85805f683 Improved VT100 emulation in shell buffers
- add screen_top to avoid recomputing from buffer contents
- fix getline behavior on very long lines in shell buffer
- add LF bindings to run qemacs in lldb session
- qe_term_get_pos() returns screen start
- handle \t and wide chars inside shell buffers for xy positioning
- split qe_term_goto_pos() from qe_term_goto_xy()
- add flags in qe_term_goto_pos():
  TG_RELATIVE_COL: column number is relative to offset position
  TG_RELATIVE_ROW: row number is relative to offset position
  TG_RELATIVE: column and/or row is relative
  TG_NOCLIP: do not clip destx/desty coordinates
  TG_NOEXTEND: do not modify buffer to reach destination
- add qe_term_fix_wrap() to break wrapping lines
- fix qe_term_goto_tab() behavior on long lines
- fix qe_term_skip_lines() to handle wrapping lines
- handle UTF-8 for lastc and repeat graphics character
- bump VERSION to 5.3.3e
2022-08-26 12:30:29 +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
fda88cdb42 Miscellaneous fixes, add Salmon mode
* more todos
* add Salmon programming language
* disable -Wno-unused-result on OpenBSD
2021-04-18 21:03:45 +02:00
Charlie Gordon
e13fcfb543 remove trailing blanks 2020-10-21 15:01:52 +00:00
Charlie Gordon
2c85e017fd Improve colorization
- add QE_STYLE_BLANK_HILITE style for extra blanks at end of lines
- add MODEF_NO_TRAILING_BLANKS flag to control this feature on a mode basis
- add -nc (--no-crc) command line option du disable CRC based update cache
- add disable-crc global variable for the same purpose
- fix termios c_oflag flags in raw mode
2020-10-21 09:55:01 +00:00
Charlie Gordon
d0b9f3dad4 bumped copyrights on modified files 2020-10-17 21:09:49 +00:00
Charlie Gordon
6e0564d4ed Improve completion system
- pass CompleteState to print_entry() handler
- remove list_get_colorized_line()
- remove get_colorized_line() window handler
- add colorize_mode along with colorize_func
- add list_display_hook() to fix list mode navigation
- rename generic_get_colorized_line() as get_colorized_line()
- fix memory leak in eb_add_property()
- pretty print tags in tag_complete() and list_tags()
2020-10-17 20:55:47 +00:00
Charlie Gordon
9d967ad29c Improve completion system
- rename and extend CompletionEntry as CompletionDef
- create xxx_completion CompletionDef structures
- rename xxx_completion() functions to xxx_complete()
- register CompletionDef structs with qe_register_completion()
- add (start, end) range in CompleteState
- use eb_puts() and eb_putc() instead of eb_printf()
- simplify eb_delete_chars()
- ignore left pane in compare-windows()
- simplify qe_list_bindings()
- improve command and variable completion popup
2020-10-17 15:41:31 +00:00
Charlie Gordon
270e8daa10 basic: fix small issues
- fix spurious crash bug on bad qesession file.
- make bold terminal text with colors 0-7 appear brighter
  this makes black bold terminal test appear grey instead
  of invisible
2017-05-18 14:14:28 +00:00
Charlie Gordon
7d7103ca70 graphics: add device and generic picture display functions
- add bitmap formats for 4BPP and BGR combinations
- add color palette in QEPicture
- add xfactor and yfactor in QEDisplay for preferred pixel granularity
  yfactor is typically 2 for text mode display
- add dpy_draw_picture() device function
- add bitmap drawing functions:
    qe_create_picture(int width, int height, QEBitmapFormat format, int flags);
    int qe_picture_lock(QEPicture *ip);
    void qe_picture_unlock(QEPicture *ip);
    qe_free_picture(QEPicture **ipp);
    QE_PAL_MODE(r, g, b, incr)
    int qe_picture_set_palette(QEPicture *ip, int mode,
                    unsigned char *p, int count, int tcolor);
    int qe_picture_copy(QEPicture *dst, int dst_x, int dst_y, int dst_w, int dst_h,
                    const QEPicture *src, int src_x, int src_y, int src_w, int src_h,
                    int flags);
    int qe_draw_picture(QEditScreen *s, int dst_x, int dst_y, int dst_w, int dst_h,
                    const QEPicture *ip,
                    int src_x, int src_y, int src_w, int src_h,
                    int flags, QEColor col);
- add 3 compile time selectable image interfaces in flactal.c benchmark
2017-05-15 09:44:21 +00:00
Charlie Gordon
1b0fc02549 tty: detect and handle AtariST terminal TW100 (F.Revol) 2017-05-07 06:18:40 +00:00
Charlie Gordon
cda5479aa0 tty: add graphics emulation with 2 pixels per char 2017-05-05 20:10:51 +00:00
Charlie Gordon
a731522e72 tty: improve terminal color capabilities detection
- use COLORTERM environment variable
- detect OS/X iTerm.app
2017-05-04 08:15:16 +00:00
Charlie Gordon
b66bdb1206 tty: hide cursor during redisplay 2017-04-25 16:58:46 +00:00
Charlie Gordon
eacb2ad6e0 shell: major improvements in tty emulator
terminal emulator:
- add EditState.cols and EditState.rows: window dimensions in characters
- pass target window to new_shell_buffer()
- use window size for shell terminal emulator initial screen size
- set COLUMNS and LINES environment variables for child processes
- factorize emulator character output
- increase number of CSI arguments
- simplify and improve CSI m argument processing including
  multiple argument sequences
- minimal support for `:` as argument separator eg:
  \033[38;5;128:128:128m
- support erase line vt100 command:
  \033[K, \033[0K erase end of line
  \033[1K         erase beginning of line
  \033[2K         erase complete line
debugging:
- pass string argument to set-trace: on, off or list of trace indicators
- remove doctor command
- add QE_TRACE_EMULATE for emulator trace messages
- fix incorrect uses of eb_delete()
2017-04-21 14:44:14 +00:00
Charlie Gordon
c57a7c6233 display: small fixes for consistency
- add wrappers in display.h
- renamed tty dpy_xxx handlers for consistency
- separate tty_term_resize called on signal and tty_dpy_invalidate
- add dpy_xor_rectangle for software cursor, remove QECOLOR_XOR
2017-04-18 09:14:55 +00:00
Charlie Gordon
7b40bb4f3a display: improve automatic redisplay upon terminal window resize
- signal and detect asynchronous redisplay signal from SIGWINCH
2017-04-17 23:01:21 +00:00