Commit graph

477 commits

Author SHA1 Message Date
Charlie Gordon
3cf4b516db Fix wheel support on Haiku (Francois Revol)
* set uninitialized x and y members of the event struct to 0
2014-02-07 23:42:23 +00:00
Charlie Gordon
cf1a83d323 fix scroll issues on some charsets and eol_dos
* update offset_top correctly for non utf8 variable width charsets
  and eol_dos buffers.  This was causing infinite loops in some cases.
2014-02-07 20:16:42 +00:00
Charlie Gordon
15ab1f9601 improve x11 clipboard support
* add eb_get_content_size() to compute size of buffer contents encoded in utf8
* simplify selection_send()
2014-02-07 15:56:15 +00:00
Charlie Gordon
d582ce5ea5 add support for wm_delete_window and utf8 clipboard in x11 (Francois Revol) 2014-02-07 07:54:27 +00:00
Charlie Gordon
6402058e14 ignore case when matching extensions.
* ignore case in match_extension() used for mode selection
2014-02-07 07:38:30 +00:00
Charlie Gordon
9fd2f32a9e fix x11 crash on yank 2014-02-06 00:26:25 +00:00
Charlie Gordon
5039815fdd fix some mode probe issues
* perform generic test on extension in text_mode_probe
* allow mode force in language modes by returning 1 instead of 0 in probe
2014-02-06 00:22:17 +00:00
Charlie Gordon
6dc603ae27 fix some problems with dos eol_type.
* skip \n if EOL_DOS in get_pos and goto_line charset methods
* detect eol_type automatically for non 8 bit charsets
2014-02-06 00:19:39 +00:00
Charlie Gordon
a7853b3dff add support for end of line types
* support 3 types of end of line: Unix, Dos and old style Mac
* detect eol type automatically in detect_charset
* set buffer eol_type together with charset
* transparently convert eol sequence to \n upon reading buffers
  characters in eb_nextc().
* transparently convert \n to eol sequence in eb_encode_uchar()
* handle eol types in convert-file-buffer-coding-system: either preserve
  current value or force it via charset suffix -unix, -doc and -mac
* change read_charset() to accept eol_type suffix
* add eol_type and eol_char to CharsetDecodeState
* change charset methods to take CharsetDecodeState instead of charset pointers
* display eol_type in mode line if not unix
2014-02-05 00:56:48 +00:00
Charlie Gordon
d0c2e1d3e6 replace unicode_to_charset with eb_encode_uchar
* prepare support for eol_type support by making char encoding buffer specific
* fix small bugs and unsafe cases.
* fix bug in eb_goto_pos for EBCDIC charsets
2014-02-04 22:47:31 +00:00
Charlie Gordon
af76bd234f ignore tiny obj directory 2014-02-04 22:19:32 +00:00
Charlie Gordon
325c03eda1 add strend to match string suffix 2014-02-04 03:28:14 +00:00
Charlie Gordon
c71c1c2ec9 use utf8_encode instead of unicode_to_charset 2014-02-04 03:26:45 +00:00
Charlie Gordon
6b0e73b689 compile parser.c separately
* publish parse_config_file() and parse_arg()
* change Makefile to compile objects for tiny version separately
2014-02-03 20:03:07 +00:00
Charlie Gordon
351cbfdb21 add support for full screen display in haiku from Francois Revol 2014-02-02 14:31:05 +00:00
Charlie Gordon
29b51f0457 split parser.c from qe.c
* store config parser as separate source file parser.c
2014-02-02 14:29:36 +00:00
Charlie Gordon
48c14ba824 add support for combining marks (accents)
* add qe_isaccent() to test for combining marks
* add do_combine_char() command to insert or remove combining marks
* fix some display glitches involving combining marks
* add expand_ligature() and combine_accent() to handle simple ligatures
* change do_what_cursor_position() to display combining marks
2014-02-01 12:49:06 +00:00
Charlie Gordon
572e442149 simplify hex_write_char 2014-01-31 14:50:56 +00:00
Charlie Gordon
645b9c1aeb cosmetic changes
* report lack of undo information in do_undo and do_redo
* make region command remove region highlight
2014-01-31 14:50:13 +00:00
Charlie Gordon
e2beb7c910 improve C mode
* improve do_c_indent to prevent buffer modification if indentation is correct
* simplify do_c_indent_region accordingly
* added c-newline to remove indentation on blank lines
2014-01-31 14:47:06 +00:00
Charlie Gordon
87a1d39c9f cosmetic changes in buffer API
* make eb_insert return number of bytes inserted
* make eb_printf return number of bytes inserted (was length of utf8 string)
2014-01-31 12:14:13 +00:00
Charlie Gordon
2c6e5f4c2c cosmetic changes: messages should start with capital letter 2014-01-29 23:28:38 +00:00
Charlie Gordon
fbb37ca1cb cosmetic changes in org mode
* start messages with capital letter
* factorize code for boundary error message
2014-01-29 23:24:00 +00:00
Charlie Gordon
19e41e92fd add support for font styles in haiku by Francois Revol 2014-01-29 22:53:57 +00:00
Charlie Gordon
acf421085a fix compilation warnings 2014-01-25 09:21:48 +00:00
Charlie Gordon
57d44f9dda pass pointer to pointer to edit_close 2014-01-24 01:30:54 +00:00
Charlie Gordon
6cb97acaa2 add Atari ST encoding from Francois Revel 2014-01-24 01:22:23 +00:00
Charlie Gordon
c5f56a0d5b Fix memory leaks and bad references detected by valgrind
* add free_font_cache()
* add css_free_colors()
* add unload_ligatures()
* add --free-all cmd line option to free memory upon exit for valgrind
* tty.c: fix off by 3 size in qe_realloc. Should be typed
* qe.c: fix invalid pointer reference upon destroying transient buffer
2014-01-24 00:46:26 +00:00
Charlie Gordon
267af9e44b new atomic calls by Francois Revol 2014-01-23 17:01:43 +00:00
Charlie Gordon
e967914b5a improve consistency in new/delete methodology
* use qe_mallocz for all structures
* prevent spurious uses of malloc/free/realloc
* pass pointers to pointers to all deletion functions
* use consistent patterns for list deletions
* add more dependencies in Makefiles
2014-01-23 12:56:22 +00:00
Charlie Gordon
4d3acef5b4 prevent spurious uses of strncpy/strtok 2014-01-23 12:43:40 +00:00
Charlie Gordon
18c514edd6 fix typo 2014-01-23 12:36:35 +00:00
Charlie Gordon
b953aaf811 improve consistency in buffer variables
* change tab-size to tab-width
* make tab-width a buffer variable
* add fill-column buffer variable
* add set-fill-column on C-x f
* add default-tab-width and default-fill-column global variables
* force indent-tabs-mode in makefile mode
* force tab-width to 8 in shell output buffers
2014-01-21 00:01:20 +00:00
Charlie Gordon
890af446cf simplify colorize_line functions: always pass NUL terminated line
* added ustrstart, ustrstr and ustristr utility functions
* simplified org_mode_colorize
2014-01-20 18:04:00 +00:00
Charlie Gordon
c0b4323ef9 merge eb_is_blank_line and eb_is_empty_line, simplify paragraph commands
* simplify eb_is_blank_line
* remove eb_is_empty_linek
* simplify paragraph commands with eb_is_blank_line
2014-01-19 17:25:02 +00:00
Charlie Gordon
2d61c2c0e1 add delete-horizontal-lines on C-x C-o
* add command delete-horizontal-lines in extras.c
* simplify do_delete_horizontal_space
* bind backward-paragraph and forward-paragraph to M-[ and M-]
* M-[ binding is not effective in terminal because it clashes with ansi
  escape sequences
* comment some key bindings for compatibility
2014-01-19 15:33:56 +00:00
Charlie Gordon
e8eee25183 fix c89 compile for Haiku (from Francois Revol) 2014-01-18 14:57:21 +00:00
Charlie Gordon
17b2c69145 fix problems with do_transpose and compute_crc
* improve compute_crc: no longer fail on simple 1 character transposition
* remove limitations on block size in do_transpose
* preserve styles in do_transpose
2014-01-17 13:19:14 +00:00
Charlie Gordon
571a96441b make new buffers use utf8 charset by default
* added BF_RAW flag for undo and styles buffers
2014-01-16 15:18:44 +00:00
Charlie Gordon
6830a827dc changed styles for org levels 2014-01-16 14:34:14 +00:00
Charlie Gordon
f545ee779b add do_mark_region, do_mark_paragraph
* add do_mark_region to set hilighted region
* add command mark-paragraph on M-h
* make command mark-whole-buffer display hilighted region
2014-01-16 14:28:28 +00:00
Charlie Gordon
2f98140860 add buf_put_key, buf_put_keys, use buf_t more consistently
* changed keytostr to buf_put_key using buf_t structure
* changed keys_to_str tp buf_put_keys using buf_t structure
* add buf_attach to initialize buf_t with non empty buffer
* simplify qe_list_bindings with inherit argument
2014-01-16 14:24:03 +00:00
Charlie Gordon
5e0256ead3 use buf_t in get_mode_line functions, add compute_percent
* add compute_percent to compute percentages safely and correctly
* changed get_mode_line API
* simplify code
2014-01-16 14:00:28 +00:00
Charlie Gordon
82adc44256 simplify eb_get_strline and fix eb_get_contents
* simplify eb_get_strline using buf_putc_utf8
* fix eb_get_contents for non utf8 buffers
2014-01-16 13:45:04 +00:00
Charlie Gordon
02da1bb7a1 add generic styles buffer from shell color mode
* styles_buffer hold static style info for each character in the buffer
* new buffer flags to create styles buffers with 1, 2 or 4 bytes per char
* copy static styles to the kill_ring and pasted them style enabled buffers
* preserve static styles in convert-buffer-file-coding-system
* display style bytes in bufed list
* add commands set-region-color, set-region-style, drop-styles
2014-01-15 19:44:24 +00:00
Charlie Gordon
51477bbc8b fix bugs in mode initializations
* mode initializers should call text-mode-init to register ccallback
  for s->offset and s->top_offset, and other generic stuff.
* this is error prone, should simplify this with base_mode property and
  keep unmapped windows lingering to get rid of ModeSavedData handlers
2014-01-15 15:54:27 +00:00
Charlie Gordon
4cf9d7227b small fixes in terminal emulation 2014-01-14 03:53:56 +00:00
Charlie Gordon
c258955d08 improve undo system
* use bit 2 in b->save_log to suspend callbacks and logging during transient
  undo phase.
* dispatch callbacks before buffer modification (eb_delete)
* this fixes bugs in the undo system where some offsets were not properly
  updated, color buffer was shifted, cursor would get lost and sometimes
  crash would follow.
* buffer colors are not undone properly
* pass extra int argument to buffer callbacks
* make eb_offset_callback more generic: handle edge effect via extra arg.
  edge effect causes offset to move upon insertion at current value
* add new log variables log_last_char and last_log.
  use these to coalesce consecutive log records and make undo more efficient
* add new command "redo" on C-x C-_ and C-x r
* fix undo glitches in the process buffer, update cursor correctly upon redo
2014-01-14 03:29:36 +00:00
Charlie Gordon
9b4582fd0d fix undo bugs
* use bit 2 in b->save_log to suspend callbacks and logging during transient
  undo phase.
* dispatch callbacks before buffer modification (eb_delete)
* this fixes bugs in the undo system where some offsets were not properly
  updated, color buffer was shifted, cursor would get lost and sometimes
  crash would follow.
* buffer colors are not undone properly
2014-01-13 23:38:15 +00:00
Charlie Gordon
4f5152024c add commands to insert combining accents
* add meta commands to insert combining accent code points:
  - M-`  insert-grave-accent
  - M-'  insert-acute-accent
  - M-^  insert-circumflex-accent
  - M-"  insert-diaeresis
* reordered some commands in qeconfig.h
2014-01-13 19:30:59 +00:00