Commit Graph

104 Commits

Author SHA1 Message Date
Ilia Maslakov
39b327825b more rebuild code 2009-05-05 13:18:05 +00:00
Ilia Maslakov
2377115b8e add more... 2009-05-04 14:31:54 +00:00
Ilia Maslakov
eac001af97 add:* collapsed_lines struct
* search collapsed region
    * add collapser region
    * add collapsed to Wedit
2009-05-04 12:47:18 +00:00
Ilia Maslakov
0bc82a444b add option_line_status and option_line_status_width.
if option_line_status = 1 then show line numbers
2009-05-02 21:12:39 +00:00
Ilia Maslakov
406e83eac4 add experemental draw line nuber 2009-05-02 10:58:12 +00:00
Andrew Borodin
3c477cbdfd Fixed editor menu reloading.
edit/edit.h: moved N_menus 5 macro to editmenu.c. Renamed edit_init_menu()
to edit_create_menu().

edit/editmenu.c: added static variable EditMenuBar to store editor menus.
Reimplemented menu creation. Added new edit_create_menu() function.

edit/editwidget.c (edit_file): used edit_create_menu() instead of
edit_init_menu().
2009-05-01 21:10:52 +04:00
Slava Zanko
74c8c748b3 internal editor: change search/replace dialogs:
replace dialog:
 * removed 'replace order' field
 * removed 'scanf' and 'regex' chackboxes
 * added selectbox element for choise type of search
 * confirm replace and 'replace all' now radiobuttons

search dialog:
 * removed 'replace order' field
 * removed 'scanf' and 'regex' chackboxes
 * added selectbox element for choise type of search
2009-04-29 16:13:12 +03:00
Ilia Maslakov
945d2183ac fix: incorrect delete selected block if is utf-8 text
add param byte_delete to edit_delete, if byte_delete = 1 then one byte only delete,
but not multibyte char.
2009-04-21 22:32:30 +00:00
Ilia Maslakov
7494db39ed clear some build warnings 2009-04-20 07:30:32 +00:00
Ilia Maslakov
42eba5c18c fix some warnings 2009-04-16 21:28:02 +00:00
Slava Zanko
ca7427cd35 edit/{editcmd.c,edit.h,edit.c}: remove catstrs() and freestrs() functions
These functions fully replaced with g_strconcat ()

WARNING! This just stupid replace. Some parts of code need to usage
concat_dir_and_file() function instread of g_strconcat ()
2009-04-14 15:12:36 +03:00
Slava Zanko
2390c46d06 Rename '*persistent_block*' to '*persistent_selection*' for more sence.
Thanks to Ossi
2009-03-27 22:48:31 +02:00
Ilia Maslakov
3cc9aac553 Add load/save option editor_persistent_block to ~/.mc/ini;
Add option editor_persistent_block to Options/General dialog;
Make persistent/nonpersistent blocks if mcedit;
Enlarged height of Options/General dialog from 17 to 19 lines;
2009-03-26 11:32:18 +00:00
Ilia Maslakov
20c769b063 Add stack navigation structure. Add hotkeys A-'-' backward A-'=' forward navigation to files.
add edit/etags.c edit/etags.h
2009-02-25 21:55:35 +00:00
Enrico Weigelt, metux IT service
c3a1d292fd added patch from ticket 148 2009-01-19 22:09:54 +01:00
Slava Zanko
8ebe7873c9 in file edit/edit.[ch]
make function edit_cursor_move() to non-return (void).
2009-01-09 01:33:17 +02:00
Pavel Tsekov
23361694b6 * src/background.c: Use the correct form of FSF's name in the copyright
notice.
* src/boxes.c: Ditto.
* src/complete.c: Ditto.
* src/execute.c: Ditto.
* src/ext.c: Ditto.
* src/file.c: Ditto.
* src/filegui.c: Ditto.
* src/fileopctx.c: Ditto.
* src/fileopctx.h: Ditto.
* src/find.c: Ditto.
* src/hotlist.c: Ditto.
* src/key.c: Ditto.
* src/keyxdef.c: Ditto.
* src/layout.c: Ditto.
* src/learn.c: Ditto.
* src/listmode.c: Ditto.
* src/main.c: Ditto.
* src/panelize.c: Ditto.
* src/slint.c: Ditto.
* src/textconf.c: Ditto.
* src/tree.c: Ditto.
* src/treestore.c: Ditto.
* src/tty.c: Ditto.
* src/util.c: Ditto.
* src/utilunix.c: Ditto.
* src/view.c: Ditto.
* src/widget.c: Ditto.
* src/wtools.c: Ditto.
* src/x11conn.c: Ditto.
* vfs/cpio.c: Ditto.
* vfs/extfs.c: Ditto.
* vfs/fish.c: Ditto.
* vfs/ftpfs.c: Ditto.
* vfs/gc.c: Ditto.
* vfs/mcfs.c: Ditto.
* vfs/mcserv.c: Ditto.
* vfs/smbfs.c: Ditto.
* vfs/tar.c: Ditto.
* vfs/undelfs.c: Ditto.
* vfs/utilvfs.c: Ditto.
* vfs/vfs.c: Ditto.
* edit/bookmark.c: Ditto.
* edit/edit.c: Ditto.
* edit/edit.h: Ditto.
* edit/editcmd.c: Ditto.
* edit/editdraw.c: Ditto.
* edit/editkeys.c: Ditto.
* edit/editlock.c: Ditto.
* edit/editmenu.c: Ditto.
* edit/editoptions.c: Ditto.
* edit/editwidget.c: Ditto.
* edit/syntax.c: Ditto.
2007-09-24 09:28:32 +00:00
Pavel Tsekov
2cb049a9cb * edit/edit.h (edit_move_to_prev_col): Declare the function to have
external linkage.
(edit_find_bracket): Likewise.
* edit/edit.c (edit_move_to_prev_col): Reflect the changes above.
(edit_find_bracket): Likewise.
* edit/editwidget.c (edit_event): When moving around with the mouse
use edit_move_down(), edit_move_up() and edit_move_to_prev_col()
instead of move_cursor() to update the cursor position since
the latter doesn't update some internal variables.
Use edit_find_bracket() to update the bracket pair highlighter
state.
2006-12-10 22:07:28 +00:00
Roland Illig
c29b321563 * edit.h: Removed the leading PATH_SEP_STR from EDIT_DIR, as the
latter is not an absolute directory.
	* edit.c: Adjusted the users of EDIT_DIR.
	* editcmd.c: Likewise.
	* syntax.c: Likewise.
	* src/user.c: Likewise.
2006-02-04 14:41:41 +00:00
Roland Illig
9be77996d6 Replaced the
editor_option_backup_ext_int hack with a string configuration
	variable, which allows the backup extension to have more than
	just four characters.
2005-09-07 08:54:11 +00:00
Leonard den Ottolander
f21564b9e6 * edit/choosesyntax.c: Create file. Menu option to override syntax
highlighting.
* edit/Makefile.am: Add choosesyntax.c.
* edit/edit.c (edit_init): Set option_auto_syntax to 1 on every invokation
of the editor.
* edit/edit.h: Pass char*** to edit_load_syntax(). Add parameters for
syntax dialog and override.
* edit/editmenu.c (menu_options): Add menu option to override syntax
hightlighting.
* edit/editoptions.c (edit_options_dialog): Pass option_syntax_type to
edit_load_syntax().
* edit/syntax.c (edit_read_syntax_file): Dynamically allocate and fill
syntax list pnames.
* edit/syntax.c (edit_load_syntax): Use char*** for syntax list.
* src/wtools.h: #include "widget.h" and remove redundant declarations
of Dlg_head and WListbox.
2005-07-24 13:37:58 +00:00
Roland Illig
073907ec5f * usermap.c: Allow user-defined keyboard bindings for mcedit.
* usermap.h: Likewise.
	* Makefile.am: Likewise.
	* editcmd.c: Define new editor commands which had been coded
	inline before.
	This change also affects some other files.
	* edit-widget.h: Invented a new type edit_key_map_type instead of
	using long for.
	* editkeys.c: Using that type.
2005-07-20 11:56:30 +00:00
Roland Illig
bf034f70e1 * edit.h: Added missing #include <stdio.h>. 2005-07-06 21:26:26 +00:00
Pavel Roskin
1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +00:00
Pavel Roskin
cd702593f6 * editwidget.c (edit_file): Move menu initialization ...
* editmenu.c (edit_init_menu): ... here.  Allocate menu
dynamically.
(edit_done_menu): Take Wmenu argument rather than Menu.  Free
menu.
(edit_reload_menu): New function, reload the menu.
(edit_options_dialog): Reload the menu if key emulation has
changed.
2005-05-20 21:19:40 +00:00
Pavel Roskin
b5b70bce10 * edit.h: Eliminate global EditMenuBar. Fix all dependencies. 2005-05-20 19:46:47 +00:00
Pavel Roskin
7511729690 * edit.h: Eliminate edit_message_dialog macro - it's used
inconsistently.  Fix all callers to use query_dialog().
2005-05-20 19:27:45 +00:00
Pavel Roskin
d78556d3c5 * edit.h: Use D_ERROR for edit_error_dialog, D_NORMAL for query
dialogs.  Remove unused edit_query_dialog4.
2005-05-03 23:26:51 +00:00
Roland Illig
ecc08f6c60 * edit.h: Removed unnecessary #include directives ...
* *.c: ... and added them here.
2005-02-22 17:00:36 +00:00
Roland Illig
db5eec4964 * edit.h: Reformatted #definitions. 2005-02-08 06:48:54 +00:00
Roland Illig
e8e0035587 * edit.h: Removed catstrs, as it is only used in editcmd.c.
* editcmd.c (catstrs): Changed declaration to be static.
2005-02-07 06:34:08 +00:00
Roland Illig
64eed6e12b * edit.h (catstrs): Changed the return type to "const char *".
* editcmd.c (catstrs): Likewise.
	* edit.c (user_menu): Added const qualifiers.
	* editcmd.c: Likewise.
	* syntax.c: Likewise.
2005-02-07 06:02:59 +00:00
Roland Illig
6dc6158ff1 * edit.h: Removed NO_INLINE_GETBYTE conditional. The name was
misleading, as it really meant INLINE_GETBYTE. Furthermore,
	it has not been working since the split of edit.h into edit-widget.h.
	* edit.c: Likewise.
2005-01-30 20:34:58 +00:00
Roland Illig
6f03d9bbd9 * edit.h: Renamed multiple inclusion guards that started with a
double underscore. Added #includes for dependent files.
	* editcmddef.h: Likewise.
	* editlock.h: Likewise.
	* edit-widget.h: Likewise.
2004-12-03 17:09:27 +00:00
Roland Illig
3c6a792d4b * edit/edit.h: renamed edit() to edit_file() to avoid GCC shadow
warnings (many variables are also called edit).
	* edit/editwidget.c: likewise.
	* src/cmd.c: renamed edit() to edit_file() to avoid GCC shadow
	warnings (many variables are also called edit).
	* src/main.c: likewise.
2004-09-19 17:46:39 +00:00
Roland Illig
243e84706e * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 18:45:56 +00:00
Pavel Roskin
90ae5d102d * edit.c (edit_execute_key_command): Return void, the result is
never used.
(edit_execute_cmd): Likewise.
2004-02-04 22:27:58 +00:00
Pavel Roskin
8bc40b44f0 Fix includes not to rely on $(top_srcdir) being in the include path. 2003-10-29 08:54:22 +00:00
Pavel Roskin
e90a7540a2 * edit.h: Make static all functions and variables that don't
need to be global.  Remove unused functions.  Adjust all
dependencies.
2003-10-14 21:48:40 +00:00
Pavel Roskin
38265d418d * edit.h: Get rid of WIDGET_COMMAND, update all dependencies. 2003-09-07 19:08:07 +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
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
d4336795e6 * edit.h: Make it easier to tweak buffer size and maximal number
of buffers.
2003-03-12 07:07:27 +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
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
Andrew V. Samoilov
bce2ba99e9 * edit.h (edit_save_mode_t): New enum for file saving mode.
* editcmd.c (): Use edit_save_mode_t.
(pipe_mail): Quote to, subject and cc with name_quote().
* edit.c (edit_get_filter): Use quoted filename.
(edit_get_write_filter): Use quoted writename.
(edit_push_action): Use g_realloc().
2002-12-18 20:04:39 +00:00
Pavel Roskin
aaf569bd48 * edit.h: Don't inclide malloc.h. Use g_malloc() and g_free()
instead.  Adjust all dependencies.
2002-12-15 18:55:53 +00:00
Pavel Roskin
ca658f44a6 * editcmd.c (edit_split_filename): Rename to edit_set_filename,
use g_malloc() and g_free() on edit->filename.
2002-12-15 02:40:38 +00:00
Pavel Roskin
581cf41929 * edit.c (edit_open_file): Remove "text" and "text_size"
arguments.  Adjust all callers.
2002-12-08 09:10:38 +00:00