Commit graph

921 commits

Author SHA1 Message Date
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
8756b73b0c x11: remove static data
- rename handlers to x11_dpy_xxx
- move almost all static data to X11State structure pointed to
  by QEditScreen.priv_data
2017-04-17 23:06:06 +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
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
e71273f3af syntax: improve tag display
- increase identifier buffer lengths
- fix some bugs in buffer property handling
2017-04-17 09:16:24 +00:00
Charlie Gordon
e08867b692 basic: reduce global variable clutter
- make more registered objects static
- document some non static global objects
- remove some global variables
2017-04-16 21:51:19 +00:00
Charlie Gordon
abe81df0b2 basic: move some global variables
- move up_down_last_x to an EditState member
- make single_window static in qe.c
- move user_option to the QEmacsState structure
- move minibuffer and completion state to a MinibufState structure
- remove static state in do_minibuffer_exit
- add key name: LB for `{`, RB for `}` and VB for `|`
2017-04-16 17:31:14 +00:00
Charlie Gordon
3dccd7f696 basic: improve command line parsing
- add qe_strtobool(str, def). Returns boolean value from str:
  y yes t true 1 evaluate to true
  any other string evaluates to false
  the empty string evaluates to def
- add bstr_t type:
  constant bounded string with pointer and length.
  bstr_make creates a bstr_t from a string pointer or NULL
  bstr_token creates a bstr_t from a string upto a separator
  bstr_get_nth creates a bstr_t from a the nth element of a string list
  bstr_equal compares bstr_t objects for equality
- use macros for type safe registation of command line options
- combine short, long, argument names and help string
- support command line options with optional arguments
2017-04-16 17:20:49 +00:00
Charlie Gordon
f1de1ca561 files: add do_find_file_noselect command
- add LF_NOSELECT flag for qe_load_file()
- add find-file-noselect command: load a file into a buffer but do not
  attach the buffer to the current window.  Due to the current implementation
  of set_mode, the buffer is only attached to the file, the file will only be
  loaded when it is finally attached to a window.
2017-04-15 13:10:53 +00:00
Charlie Gordon
84547c6209 build: fix compile time warning
- fix some warnings on unused variables and variables potentially
  used before set
- force definition of va_copy() and atomic_get_and_set() for haiku
2017-04-15 09:39:02 +00:00
Charlie Gordon
b39607410e fixed compilation warnings 2017-04-14 06:59:17 +00:00
Charlie Gordon
8ab9a36ad1 shell: move point to the end of buffer in start-shell
- C-x RET RET can be used to go to the shell prompt directly
2017-04-12 07:56:15 +00:00
Charlie Gordon
e333c211fe display: fix some popup issues
- prevent some commands from a popup-window or close it
2017-04-12 07:54:30 +00:00
Charlie Gordon
6c595c1f2c colors: extend color system
- add 8K color modes and 64-bit QETermStyle values
- add 64-bit buffer style support
- reduce colored character system used in syntax handlers to 8-bit style
  and 24-bit code point
- use QETermStyle type instead of int wherever a composite style is used
- force color system used by the terminal with environment variables:
  USE_16_COLORS=1, USE_256_COLORS=1 or USE_TRUE_COLORS=1
2017-04-12 07:33:20 +00:00
Charlie Gordon
c64555e638 lists: use QE_STYLE_SEL bit instead of hard coded QE_STYLE_SELECTION 2017-04-11 07:28:26 +00:00
Charlie Gordon
f106d3dc66 extra-modes: fix potential out of bounds access 2017-04-11 07:27:14 +00:00
Charlie Gordon
5d463eb5ad styles: improve consistency
- rename font styles QE_STYLE_xxx to QE_FONT_STYLE_xxx
- rename font family QE_FAMILY_xxx to QE_FONT_FAMILY_xxx
- improve tests/16colors.pl: display bold italics combination
- improve tests/color-spaces.pl: compare true color and palette dumps
- add colortest target in Makefile to produce various color patterns
2017-04-11 06:46:13 +00:00
Charlie Gordon
e5c5103335 clang: improve auto-indentation
- auto-indent multi-line comments to align initial stars
  such as this:

  /* This is a comment
   * with a second line.
   */

and free form comment paragraphs this way:

  /* This is a comment
     with a second line.
   */
2017-04-10 17:09:22 +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
4104ab568b display: improve color and style handling
- add support for 256 and true color terminals
- fix color handling for defined styles
- fix bold, italic and underline handling for terminals
- use more explicit symbols for qe-term emulator in shell.c
- shell buffer terminal emulator still uses 16 colors
- display buffer style in C-X =
- bumped version to 0.5.0dev
2017-04-02 01:12:01 +00:00
Charlie Gordon
ebadabb17a extras: improve compare-windows
- move resync code to separate function
- try and resync on spacing changes and single word changes
2017-04-01 14:38:28 +00:00
Charlie Gordon
0eae5a52fb fix parenthesis colors 2017-03-31 19:12:07 +00:00
Charlie Gordon
073fbc3439 tags: fix some bugs, extend system
- pass target window to completion functions
- fix tag completion at find-tag prompt
- add tag support in python mode
- set tag offset to the actual word instead of start of line
2017-03-31 15:33:02 +00:00
Charlie Gordon
35d2610146 clang: add primitive tag support
- add buffer properties with offset tracking
- use buffer properties for type, macro, function and object definitions.
- display current function or type name on mode line
- add list-tags command to show the tags detected for the current buffer
- add goto-tag on C-X , and M-F1 to jump to the definition of the current word
- add find-tag on C-X . to search for a given tag with completion
2017-03-31 07:51:56 +00:00
Charlie Gordon
d3e8e65277 shell: fix colorization of clang note diagnostics 2017-03-31 07:42:44 +00:00
Charlie Gordon
c7d8b8ee29 fix indentation 2017-03-31 06:05:16 +00:00
Charlie Gordon
66599e65cf haiku: add qemacs.rdef icon 2017-03-28 20:11:55 +00:00
Charlie Gordon
7a8cca8232 haiku: merge patch by Francois Revol to compile with gcc5 2017-03-28 12:53:15 +00:00
Charlie Gordon
004e173dee shell-script-mode: small improvements
- more explicit sh-bang support
- support $'This is a quote: "\'"' syntax
- better match for keywords
- keywords introduce command state except for, case, export and in
2017-03-28 12:50:30 +00:00
Charlie Gordon
5ad42a0dc3 shell-script-mode:
- renamed script-mode to shell-script-mode
- merged patch by Hadrien Lacour
- improve parsing, recognise names, keywords, meta-characters, substitutions...
- add flexibility in forward-block (M-C-f) and backward-block (M-C-b) to
  match block delimiters with non default styles
2017-03-28 06:33:29 +00:00
Charlie Gordon
d06fdbfd14 basic: changed API for popup windows
- pass current window to show_popup()
- remove show_ptr argument from new_help_buffer()
- call show_popup() unconditionally
- add int eb_vprintf(EditBuffer *b, const char *fmt, va_list ap);
2017-03-26 15:57:24 +00:00
Charlie Gordon
5118c5e482 ignore some temporary files 2017-03-25 18:16:32 +00:00
Charlie Gordon
c5a3bb8ecb updated heading 2017-03-25 18:14:59 +00:00
Charlie Gordon
dc0db62312 utilities: sundries 2017-03-25 18:13:32 +00:00
Charlie Gordon
67e50a2511 arm: use to_hex instead of local function 2017-03-25 18:09:50 +00:00
Charlie Gordon
a449fe3c23 simplified to_hex() 2017-03-25 18:07:18 +00:00
Charlie Gordon
24769141f4 updated headings 2017-03-25 18:04:51 +00:00
Charlie Gordon
91d842618f modes: add less mode for .less files
- rename all popup related mode functions from less_* to popup_*
- add less-mode for .less files (preprocessor for css files)
- add FILE to list of C types
2017-03-25 18:00:52 +00:00
Charlie Gordon
7e27ea3c66 C-x C-m finds the most recently used process buffer 2017-03-25 17:49:39 +00:00
Charlie Gordon
2d59865702 charset: default to mac-roman for non utf-8 files with old style mac eol 2017-03-22 17:13:10 +00:00
Charlie Gordon
34a4da48b2 files: add -1 (--single-window) command line option
- add command line options to prevent window splitting
2017-03-20 18:43:33 +00:00
Charlie Gordon
5020243384 unihex: fix display problems
- fix invalid widths in unicode_width.h
- avoid setting s->offset to invalid values in hex.c
- update s->unihex_mode on the fly if larger code-points are displayed
- display code-points with at least 4 hex digits
- compute default s->dump_width more accurately
2017-03-19 15:39:25 +00:00
Charlie Gordon
96f51a84c5 unicode: updated width table 2017-03-19 13:24:06 +00:00
Charlie Gordon
7a8065c5a8 extras: improved compare-windows
- add static int qe_skip_comments(EditState *s, int offset, int *offsetp);
- add static int qe_skip_spaces(EditState *s, int offset, int *offsetp);
- add state variable ignore-comments
- C-u A-= toggles ignore-spaces
- C-u C-u A-= toggles ignore-comments
- C-u 2 0 A-= toggles ignore-spaces and ignore-comments
- compare-windows status messages document ignored stuff
2017-03-19 13:20:34 +00:00
Charlie Gordon
12a44b104e clang: fix alignment bug on ternary operator 2017-03-18 14:24:47 +00:00
Charlie Gordon
0d630448db shell: handle C-t and M-t at shell prompt 2017-03-18 14:13:33 +00:00
Charlie Gordon
0f4285bfec shell: add support for word case changing commands 2017-03-17 16:28:04 +00:00
Charlie Gordon
3a65d1143a display: fix single accent curor position 2017-03-17 16:26:16 +00:00
Charlie Gordon
a63aff6f3e fixed compilation on stack Debian 2017-03-16 17:18:29 +00:00
Charlie Gordon
74be7bcc22 update TODO file 2017-03-16 09:35:28 +00:00