Pavel Roskin
f8e00e7b6a
* widget.c (listbox_new): Remove "action" argument. Listboxes
...
without callbacks default to closing the dialog. Adjust all
users. This fixes double click on completion listbox.
* widget.h: Use uppercase names for the return values of the
listbox callback.
2003-09-01 07:31:56 +00:00
Pavel Roskin
58545e65c2
* widget.h: Use exact type in the listbox callback. Adjust all
...
legitimate users, remove all unused callbacks.
2003-09-01 05:43:20 +00:00
Pavel Roskin
2b9b18150e
* widget.h (button_new): Remove unused extra argument. Adjust
...
all dependencies.
2003-09-01 02:07:02 +00:00
Pavel Roskin
fab6e8a493
* widget.h: Completely get rid of tkname. Rename it to histname
...
for the input widget. Adjust all dependencies.
2003-09-01 00:18:37 +00:00
Pavel Roskin
10f65ac83d
* dlg.h (struct Widget): Remove tkname field.
...
(init_widget): Remove tkname argument.
* widget.h (listbox_new): Likewise.
Adjust all dependencies.
2003-08-31 23:29:49 +00:00
Pavel Roskin
d521073663
Add missing include.
2003-08-18 05:20:52 +00:00
Pavel Roskin
cf9acd036e
* edit-widget.h: Resurrect "dir" field in WEdit to store
...
directory for relative filenames.
* edit.c (edit_clean): Release edit->dir.
* editcmd.c (edit_save_file): Use absolute filename.
Temporarily disable safe save and backups on remote VFS because
it doesn't work - again.
2003-07-31 16:38:07 +00:00
Pavel Roskin
81d396da33
Remove useless initialization.
2003-07-31 16:32:30 +00:00
Pavel Roskin
58572c60da
* edit.c (edit_execute_cmd): Enable user menu in mcedit.
2003-07-25 18:52:28 +00:00
Pavel Roskin
c72a1ea44c
Get rid of all references to NATIVE_WIN32.
2003-07-23 03:22:32 +00:00
Pavel Roskin
dadbdd25e9
* editcmd.c (edit_quit_cmd): Rename to ...
...
(edit_ok_to_exit): ... this. Don't stop dialog - this function
is called by the dialog code.
* editwidget.c (edit_dialog_callback): Process DLG_VALIDATE
event. Don't exit it the user wants to continue editing.
* edit.c (edit_execute_cmd): Close the dialog - it will ask user
if necessary.
2003-07-21 03:54:47 +00:00
Pavel Roskin
7a5c9a3834
Kill another instance of using delete_file in a wrong place.
2003-07-20 23:34:29 +00:00
Pavel Roskin
9bc8df86ad
* editcmd.c (edit_quit_cmd): Don't save this command in the undo
...
stack. Don't force any refresh. Don't delete unsaved files, do
it ...
* edit.c (edit_clean): ... here. This ensures that unsaved
files from the mcedit command line are erased on Ctrl-n.
2003-07-20 23:24:25 +00:00
Pavel Roskin
0633d91f60
* editwidget.c (edit): Remove unused variable "framed".
2003-07-20 22:15:28 +00:00
Pavel Roskin
4b8f0b02b2
* edit.c (edit_clean): Remove stale lock if any.
2003-07-09 00:21:09 +00:00
Pavel Roskin
5ff5f8e9d1
* edit-widget.h: Add new field loading_done.
...
* edit.c (edit_init): Set loading_done.
(edit_insert): Don't call edit_modification() before the file is
completely loaded.
2003-07-09 00:18:11 +00:00
Pavel Roskin
59593d0e1b
* edit-widget.h: Eliminate unused explicit_syntax field.
2003-07-08 23:58:36 +00:00
Pavel Roskin
729a855b29
* edit-widget.h: Stop misusing "unsigned char" for boolean.
...
Eliminate have_frame - it's unused. Adjust all dependencies.
2003-07-08 23:46:01 +00:00
Pavel Roskin
6b63507463
* editkeys.c: Leave only distinct entries in cooledit_key_map
...
and emacs_key_map. Move the rest to common_key_map.
2003-06-14 05:02:33 +00:00
Pavel Roskin
9dae056016
* editkeys.c (emacs_key_map): Move Atl-'>' and Alt-'<' ...
...
(common_key_map): ... here.
2003-06-10 00:35:55 +00:00
Pavel Roskin
4a398f0ee7
* editcmd.c (edit_ext_cmd): Fix memory leak.
2003-06-05 17:55:50 +00:00
Pavel Roskin
69a16471a9
edit_ext_cmd(): trivial simplification.
2003-06-05 04:06:37 +00:00
Pavel Roskin
f6e1d08562
Typo.
2003-06-02 19:25:15 +00:00
Pavel Roskin
3cd4571dc9
Typos and britainisms.
2003-06-02 18:39:44 +00:00
Pavel Roskin
a66e5f511f
Add comment for edit_ext_cmd.
2003-05-30 21:14:07 +00:00
Pavel Roskin
bdc56f331b
* editcmd.c: Implement pasting the output of any external
...
command.
* editmenu.c: Add menu entries for that.
* editcmddef.h: Add new command CK_ExtCmd.
2003-05-30 21:06:10 +00:00
Pavel Roskin
e95373535c
* edit.c: Move edit_modification() before actions to provide
...
proper repainting if there are dialogs invoked by actions.
2003-04-05 01:43:58 +00:00
Pavel Roskin
66a823861f
* editlock.c: Split lock into user@host and pid and report them
...
separately.
2003-04-05 01:29:15 +00:00
Pavel Roskin
ebf1bcfa33
* edit.c (edit_load_file): Use vfs_file_is_local(), not
...
vfs_current_is_local().
* editlock.c (edit_lock_file): Disable locking on VFS.
2003-04-02 22:25:00 +00:00
Pavel Roskin
d88b75838a
* editlock.c, editlock.h: New files. Implement file locking in
...
Emacs style, as documented in JED editor sources.
* Makefile.am: Add those files to build tree.
* edit-widget.c (WEdit): New property 'locked', 0 on edit_init.
* edit.c (edit_modification): Lock buffer on modification.
* editcmd.c (edit_save_cmd, edit_save_as_cmd): Handle locking
during file save.
(edit_load_file_from_filename): Unlock. Remove 2 duplicate
lines (handled by edit_init).
(edit_quit_cmd): Unlock.
2003-04-02 19:36:10 +00:00
Pavel Roskin
d4336795e6
* edit.h: Make it easier to tweak buffer size and maximal number
...
of buffers.
2003-03-12 07:07:27 +00:00
Pavel Roskin
867704615b
* key.c (correct_key_code): Convert unrecognized 0177, Ctrl-h
...
and Ctrl-d into Delete and Backspace. Remove all references to
those keys in other files.
2003-03-10 20:27:54 +00:00
Pavel Roskin
7cdbc354c2
* editkeys.c (common_key_map): Delete previous word by
...
Alt-Backspace. Fix Ctrl-Backspace on some terminals.
Reported by Andrew V. Samoilov <sav@bcs.zp.ua>
2003-03-07 21:47:32 +00:00
Andrew V. Samoilov
6f35fce869
* syntax.c (edit_read_syntax_file): Fix segmentation violation.
2003-03-06 18:42:33 +00:00
Andrew V. Samoilov
902cd4834b
* syntax.c (edit_read_syntax_rules): Check for list of defines
...
is already initialized.
(edit_read_syntax_file): Process `include ...` before first
`file ...`, so color definitions can be stored separately.
2003-03-04 09:52:40 +00:00
Andrew V. Samoilov
599f3e8bfb
* syntax.c (subst_defines): New function to substitute defines.
...
(this_try_alloc_color_pair): Move color substitution ...
(edit_read_syntax_rules): ... here. Use subst_defines() to
substitute colors for contexts and keywords. Allow multiword
defines.
2003-03-03 13:37:45 +00:00
Andrew V. Samoilov
0c03bd9dd3
* (edit_read_syntax_rules): Fix memory corruption if key is redefined
2003-03-03 08:55:11 +00:00
Andrew V. Samoilov
f0a33821e6
* syntax.c (edit_read_syntax_rules): Add args argument and it
...
use instead of own auto args array to share this area with ...
(edit_read_syntax_file): ... this. Adjust for the above.
Use strncpy() instead of unsafe strcpy().
2003-02-26 19:15:27 +00:00
Andrew V. Samoilov
6a8a443ed2
* syntax.c (edit_read_syntax_rules): Add args argument and it
...
use instead of own auto args array to share this area with ...
(edit_read_syntax_file): ... this. Adjust for the above.
Use strncpy() instead of unsafe strcpy().
2003-02-26 19:01:40 +00:00
Andrew V. Samoilov
4dc31f3e06
(this_try_alloc_color_pair): Set fg to f if fg is not NULL. Likewise for
...
fg and bg.
(edit_free_syntax_rules): Call destroy_defines() even if there is no rules.
2003-02-25 16:16:18 +00:00
Pavel Roskin
0158eaf0f3
* syntax.c (defines): New static variable for list of defines.
...
(mc_defines_destroy): New function to release memory of key
pair.
(destroy_defines): New function to destroy list of defines
completely.
(this_try_alloc_color_pair): Use strncpy() instead of unsafe
strcpy(). Use values from list of defines to substitute given
parameters.
(edit_read_syntax_rules): Initialize list of defines and process
new "define" keyword. Use strncpy() instead of unsafe strcpy().
(edit_free_syntax_rules): Destroy list of defines.
2003-02-25 15:07:53 +00:00
Andrew V. Samoilov
ebc8d1690a
* editmenu.c (OptMenuEmacs): Define as OptMenu.
...
(SearReplMenuEmacs): Define as SearReplMenu.
(EditMenuEmacs): Define as EditMenu.
2003-02-21 23:32:06 +00:00
Pavel Roskin
0da0c44f87
* (OptMenu): Add "Learn Keys".
...
(OptMenuEmacs): Likewise.
2003-01-28 17:56:53 +00:00
Andrew V. Samoilov
a132b94cf9
* edit-widget.h (struct macro): Move definition ...
...
* edit.h: ... here to fix compilation on HP-UX.
2003-01-27 15:46:40 +00:00
Pavel Roskin
812bac9a33
* editkeys.c: Move key maps to the file scope. Put common keys
...
to a separate table common_key_map.
(edit_translate_key): Remove unused argument x_keycode.
2002-12-25 22:53:07 +00:00
Pavel Roskin
e0bbeb7085
* editkeys.c (edit_translate_key): Treat Shift-Enter as return
...
without indent. Useful when pasting multiline text with
Shift-button3 or Shift-Insert with autoindent enabled.
2002-12-25 05:46:03 +00:00
Pavel Roskin
554acb2837
* editkeys.c (edit_translate_key): Treat Ctrl-Home and Ctrl-End
...
like Ctrl-PgUp and Ctrl-PgDown respectively.
2002-12-23 10:18:22 +00:00
Pavel Roskin
ab43e6db88
* edit_key_translator.c: Rename to ...
...
* editkeys.c: ... this.
* edit.c (edit_translate_key): Move to editkeys.c.
* Makefile.am: Adjust for the above.
2002-12-23 10:13:35 +00:00
Pavel Roskin
361ec45373
Fix includes.
2002-12-23 10:12:40 +00:00
Pavel Roskin
d6947e39cf
* edit.c (edit_translate_key): Remove x_state argument, it's now
...
a part of x_keycode.
* editwidget.c (get_key_state): Remove.
2002-12-21 08:46:50 +00:00