Commit graph

15 commits

Author SHA1 Message Date
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
3580b53452 syntax: improve minibuffer and popup handling
- remove static state for minibuffer handling, use mode specific state attached
  to the buffer.
- remove static pointer for the popup last active window.  Use new
  target_window member in EditState.
- remove EditState.minibuf, replaced by WF_MINIBUF flag in EditState.flags
- rename minibuffer commands for consistency
- remove unused global variable debug_flags
- prevent search from minibuffer
- fix toggle-full-screen refresh bug. C-x f is bound to toggle-full-screen
  and could be typed by mistake for C-x C-f, switching to full screen mode
  but with a refresh delay.  This caused confusing behavior interpreted as a
  layout bug.
- make charset_ucs2le, charset_ucs2be, charset_ucs4le, charset_ucs4be local
  in charset.c
- make edit_detach() and edit_attach() local in qe.c
- redraw status and diag messages in edit_display(). This caused display
  bugs in x11 as asynchronous messages were erased by minibuffer window
  refresh.
- display status messages in diag area (bottom right screen corner) if
  minibuffer is active.
- force put_status message update if message starts with !
- force complete_refresh if window was resized or layout was changed
2017-04-17 18:14:15 +00:00
Charlie Gordon
799b1489bc display: full support for 256 color virtual terminal
- add various utilities for color escape sequence testing:
  tests/16colors.pl
  tests/256colors2.pl
  tests/color-spaces.pl
  tests/truecolors.sh
  tests/xterm-colortest.sh
  tests/xterm-colour-chart.py
- use colored code-points only for syntax highlighting
- use QETermStyle and QEStyleDef internally
- convert to TTYChar attributes only for text terminal output.
- remove most CHAR_MASK and STYLE_SHIFT handling
- pass QETermStyle array to get_colorized_line mode handlers
- pass QETermStyle array to isearch_colorize_matches
- remove combine_static_colorized_line
- move color matching functions to util.c
- rename get_tty_color as qe_map_color
- improve local variable naming consistency:
  DisplayState *ds, QEStyleDef *stp, QEStyleDef styledef.
2017-04-03 08:33:57 +00:00
Charlie Gordon
f4a41519b6 search: sundries 2017-01-02 11:39:07 +00:00
Charlie Gordon
2c921d7c1a search: extensions
- add `delete-matching-lines`
- move search command definitions to search.c
2017-01-02 11:30:09 +00:00
Charlie Gordon
f4c1b633a9 search: improvements
- C-u C-s selects regex searching (not yet implemented)
- `do_isearch()` takes extra argument for argval
- cycle hex and unihex isearch modes on M-C-b instead of C-b and M-b
- toggle regex incremental searching on C-t and M-r
- C-j no longer needs quoting in isearch
- no longer keep lingering search matches after search exits
2016-12-31 11:25:25 +00:00
Charlie Gordon
79bf90c8d6 basic: simplifications
- remove `eb_nextc_style()`
- `eb_nextc()` does not modify `b->cur_style`
- add `eb_get_style()` to retrieve style for given offset in full-style buffers
- add `eb_next()` and `eb_prev()` to skip chars
- pass `offset` to `eb_get_line()` and `generic_get_colorized_line()`...
- use `eb_skip_chars()` in `do_delete_char()` and `text_write_char()`
- replaced `eb_get_strline()` with `eb_fgets()` with similar semantics
  except return value is number of bytes before the newline or end of line
- no longer pass end offset to `isearch_colorize_matches()`
- just pass number of code points to `combine_static_colorized_line()`
- no longer call `isearch_colorize_matches` from `generic_get_colorized_line`
2016-12-23 19:51:48 +00:00
Charlie Gordon
9c99730239 display: cursor handling
- merge do_center_cursor and do_center_cursor_maybe:
  do_center_cursor takes an `int force` argument
- add set-window-style command to change `e->default_style`
- change argument sign for do_scroll_left_right() for consistency
  scroll window by increments of space_width
  toggle WRAP_LINE, WRAP_WORD and WRAP_TRUNCATE in do_scroll_left_right()
- do not force WRAP_TRUNCATE in dired view pane to avoid problems on files
  with extremely long lines
2016-12-23 13:00:55 +00:00
Charlie Gordon
b962e33ade updated copyrights 2016-03-06 19:53:06 +00:00
Charlie Gordon
225af9a196 search: added count-matches
- handle dir=0 in eb_search as forward search
- renamed isearch_display to isearch_run
- display timing if isearch_run takes longer than 100ms
- do_search_string with dir=0 counts matches
- added count-matches(str) on M-C
2016-03-06 17:48:01 +00:00
Charlie Gordon
1f5a77a784 portability: stop defining symbols starting with __ 2015-09-16 22:18:22 +00:00
Charlie Gordon
f37a58b4a6 search: remember last search flags
- C-s and C-r in incremental search also restores flags from last search
- do_search_string() accepts empty string
2015-08-26 23:13:36 +00:00
Charlie Gordon
dff0947665 search: show search matches, fix bugs
- fix bug with word-match incremental search
- pass max offset to eb_search
- simplify search code, keep separate u32 and flag arrays
- add ISearchState* to EditWindow to display current or last matches
- add style for search matches
2015-08-19 20:33:01 +00:00
Charlie Gordon
490a858c22 general: sanity checks
- make QECharset const by default, use struct QECharset for mutable references.
- use OWNED attribute to flag unique pointers to allocated memory.
- add typedefs for InputMethod, ISearchState
- use typedef for ModeDef
2015-08-19 16:22:30 +00:00
Charlie Gordon
b8fb3f310e search: split search code from qe.c into new module search.c 2015-08-17 16:56:48 +00:00