Commit graph

871 commits

Author SHA1 Message Date
Charlie Gordon
26fd39d9e0 unicode: improve support for wide and combining code points
- qe_isaccent() recognises all combining code points (to be refined)
- add computer generated width table unicode_width.h
- display difference in hex in compare-windows to distinguish
  space and nbsp, normal and combined form for accented letters.
- display multiple combining code points in what-cursor-position (C-x =)
- attach combining code points to preceeding space in display_char_bidir
- handle accents specificaaly in flush_fragment
- handle combining code-points in screen backstore via indirection table
  this transient table can be inspected via describe-screen
2017-03-16 09:16:31 +00:00
Charlie Gordon
ec07d5aec8 basic: charset improvements
- add QECharset.encode_table as a default for CharsetDecodeState.table
- make CharsetDecodeState.table const
- use static initializers for utf8 tables
- add al32utf8 charset name (used in Oracle for true utf-8 encoding)
- use direct pointers in unicode_glyph_range_index
- initialize unicode_glyph_range_index at run time
- rename unicode_glyph_tty_width as unicode_tty_glyph_width
- changed unihex display to space out single width characters
2017-03-15 23:42:23 +00:00
Charlie Gordon
252e2848ab basic: fix potentially invalid shifts
- use unsigned arithmetics to avoid implementation-defined behavior
  on (1 << 31)
2017-03-15 23:17:58 +00:00
Charlie Gordon
22594638fb unihex: fix crash bug
- fix crash bug in initialization code
- prevent display of invalid code points
2017-03-15 07:38:58 +00:00
Charlie Gordon
063801372c file: improve qe_load_file API
- pass flags as bit mask for:
  kill_buffer, load_resource, cwd_relative, split_window
- fix bug with multiple files on command line from different directories
2017-03-15 07:32:48 +00:00
Charlie Gordon
38fdd559f5 display: improve display structure handling
- add QEDisplay.dpy_describe handler
- rename dpy_init as screen_init
- allocate TTYState instead of using static struct in tty.c
2017-03-15 07:24:31 +00:00
Charlie Gordon
2f400723b0 perl: improve colorizer
- add perl_keywords and perl_types
- add _ as variable name character
- comments
2017-03-06 12:59:36 +00:00
Charlie Gordon
1ee5b56846 updated TODO, dates 2017-03-06 12:54:49 +00:00
Charlie Gordon
ae68f6ec34 clang: improve auto-indentation
- fix auto indent at end of file
- remove blanks at end of line in c-newline
2017-03-06 12:53:53 +00:00
Charlie Gordon
8573982c12 basic: improve goto-line and goto-char and next-mode
- handle size suffixes kmg and KMG
- split qe_find_target_window() for next-mode and find-file
  from a dired left pane
2017-03-02 15:21:16 +00:00
Charlie Gordon
62c9bc9f34 added more TODOs 2017-02-25 19:44:30 +00:00
Charlie Gordon
983bef5bcc basic: show error message if load-resource-file fails 2017-02-25 19:39:49 +00:00
Charlie Gordon
4f9f90b269 extras: fix backward-level at end of comment 2017-02-25 19:38:38 +00:00
Charlie Gordon
60d2653cd0 shell: fix column number parsing for next-error 2017-02-25 19:37:18 +00:00
Charlie Gordon
99d739d166 archive: fix rule to uncompress .Z files 2017-02-25 19:34:28 +00:00
Charlie Gordon
ef6310eec1 config: fix haiku compilation
- move local variable definition to start of block (patch by Francois Revol)
2017-01-31 21:38:02 +00:00
Charlie Gordon
56a0b95bc4 config: fix window context for .qerc files fix code fragment coloring
- save and restore qs->active_window around .qerc config file parsing
  and set qs->active_window to target window for attribute setting.
2017-01-31 20:22:13 +00:00
Charlie Gordon
917cf43abb markdown: fix code fragment coloring
- code fragments introduced with the ``` syntax can now be indented
2017-01-31 20:18:55 +00:00
Charlie Gordon
6a7ac743a4 shell: fix crash on large process output
- fix `eb_fgets()`: used to return out of bound length.
2017-01-03 04:55:24 +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
5e8c4b023d shell: colorize file fragments from compilation and grep
- add `offset` member in `QEColorizeContext` structure
- add `ModeDef *qe_find_mode_filename(const char *filename, int flags);`
- make `combine_static_colorized_line` public
- add public function `shell_colorize_line`:
  detect file fragments with filename followed by `:` without space at bol
  special case clang errors that display the file contents after the line
- special case `shell_colorize_line` for static color combination scheme
2017-01-01 15:40:46 +00:00
Charlie Gordon
79bbfb27c3 markdown: fix language detection for C# and C++ 2017-01-01 15:33:18 +00:00
Charlie Gordon
23bfd2ea69 basic: C-l twice recenters the window 2017-01-01 12:51:22 +00:00
Charlie Gordon
0f1d2244e7 basic: improve config file handling
- add `add-resource-path(string)` to add a new resource directory
- bind `load-file-from-path` on C-c C-f
2016-12-31 18:45:08 +00:00
Charlie Gordon
bfe0b5f528 dired: only output previewing message from filelist 2016-12-31 11:29:38 +00:00
Charlie Gordon
dee4908fe8 display: disable broken bidir display 2016-12-31 11:28:41 +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
94464bd939 dired: add filelist mode
- add `WF_FILELIST` window flag for preview-mode tests
- add `argval` argument to `do_dired()`
- `dired_view_file()` displays message and returns preview pane
- `dired` command with argument selects filelist mode with navigation pane
  bound to C-u C-x C-d
- add `filelist` command
2016-12-31 11:12:16 +00:00
Charlie Gordon
b28a387889 build: fix X11 rules on OpenBSD
- applied patch by Han Boetes
- scan standard places for X11 includes and libraries
- do not link with -ld on OpenBSD
2016-12-28 07:39:45 +00:00
Charlie Gordon
87a151fd95 comments 2016-12-27 12:31:36 +00:00
Charlie Gordon
f74938305c build: improvements
- generate libqhtml object files in target dependant directories
- make multiple targets coexist
- fix .cvsignore file
- fix clean and distclean targets
2016-12-27 11:40:40 +00:00
Charlie Gordon
6cd406d5e3 html2png: fixed compilation warning 2016-12-27 11:38:36 +00:00
Charlie Gordon
f41235695f display: some fixes, simplifiations
- add `gutter_width` in `DisplayState` for line number column
- add `int get_glyph_width(QEditScreen *screen,
                           EditState *s, int style_index, int c);`
  and `int get_line_height(QEditScreen *screen,
                           EditState *s, int style_index);`
  to compute font dimensions from style index and window
- compute borders more accurately in `display_window_borders()`
- clip text drawing, use window relative coordinates in `flush_line()`
- fix width computation for diagnostic status display in X11
- use QE_STYLE_DEFAULT and remove redundant e->default_style references
2016-12-27 10:13:46 +00:00
Charlie Gordon
5bc6133fb3 sorting: add support for dictionary order
- improved stability, works for reverse-sort
- simplified reverse sort handling
- select dictionary order via C-u 2 A-x sort-buffer
2016-12-26 15:01:58 +00:00
Charlie Gordon
8587dd62a2 display: improve handling of very long lines
- simplify the code
- fix display of continuation lines when line numbers are visible
2016-12-26 13:57:36 +00:00
Charlie Gordon
2d984bbbd5 display: improve handling of very long lines
- simplify the code
- fix display of continuation lines when line numbers are visible
2016-12-26 13:44:42 +00:00
Charlie Gordon
bd5086c85c build: remove c99 specific constructions 2016-12-26 09:28:36 +00:00
Charlie Gordon
433d6bec4f x11: add x11-list-fonts on C-h f 2016-12-25 23:39:30 +00:00
Charlie Gordon
7969fbb276 build: use separate object directory for x11 build
- configure no longer defines CONFIG_X11 in C
- generate modules.txt in each target directory
2016-12-25 23:32:48 +00:00
Charlie Gordon
862119faf3 use character width in graphics mode for dired layout 2016-12-25 11:31:16 +00:00
Charlie Gordon
be9f03731e basic: use our own version of qsort_r
- add `qe_qsort_r()` because some platforms do not provide `qsort_r()`
  it uses a median of 3 pivot selection and falls back to insert sort
  for small chunks.
- use `qe_qsort_r()` in dired, remove `state` field in `DirEntry`
- use `qe_qsort_r()` in sort-buffer commands
- make buffer sorting algorithm stable
2016-12-25 10:51:14 +00:00
Charlie Gordon
f9ebd10d55 display: simplifications and comments
- add remarks about tricky display internal states
- display `x_disp[]` on mode-line
2016-12-23 22:51:47 +00:00
Charlie Gordon
4e1cb3cf37 display: improvements
- pass `cursor_func` and `cursor_opaque` to `display_init()`
- add dummy `display_close()`
- add `DISP_NONE` display mode
- fix timing message display, trim *messages* buffer
2016-12-23 20:28:56 +00:00
Charlie Gordon
ef3974ecdd buffer: improvements
- fixed `do_forward_block()` to handle very long lines gracefully
- simplified `to_transpose()`
- add `do_describe_window()` for `describe-window` command on C-h w
2016-12-23 20:12:05 +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
374b514528 display: small improvements
- rename method dispatcher `text_display` as `display_line`
  rename corresponding mode based handlers as `xxx_display_name`
- rename method dispatcher `text_backward_offset` as `backward_offset`
- add default text handlers for `move_bof` and `move_eof` in
  hex, binary and unihex modes
- handle utf-8 in window prompt (ex: default buffer name for C-x b)
- add various TODOs
2016-12-23 15:51:51 +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
e479e31c1d modes: small improvements
- prevent ini_mode to match JSON files
- add ".Sql" extension for sql_mode
- add `protected`, `$this`, `as`, `null` and builtin functions as PHP keywords
2016-12-23 12:21:46 +00:00
Charlie Gordon
e4dbd08a7f clang: prevent auto indentation on electric keys if auto-indent is disabled 2016-12-23 12:05:22 +00:00