From 2396f2c83c562b6d6b9c1f1e597d2abc75fa474d Mon Sep 17 00:00:00 2001
From: Vit Rosin <vit_r@list.ru>
Date: Tue, 2 Mar 2010 19:12:12 +0000
Subject: [PATCH] src/cmd.c seems UN needed function do_edit()
---
src/cmd.c | 20 +++++++-------------
1 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/src/cmd.c b/src/cmd.c
index 3436778..20b0c6b 100644
a
|
b
|
do_edit_at_line (const char *what, int start_line) |
318 | 318 | repaint_screen (); |
319 | 319 | } |
320 | 320 | |
321 | | static void |
322 | | do_edit (const char *what) |
323 | | { |
324 | | do_edit_at_line (what, 0); |
325 | | } |
326 | | |
327 | 321 | void |
328 | 322 | edit_cmd (void) |
329 | 323 | { |
330 | 324 | if (regex_command (selection (current_panel)->fname, "Edit", 0) == 0) |
331 | | do_edit (selection (current_panel)->fname); |
| 325 | do_edit_at_line (selection (current_panel)->fname, 0); |
332 | 326 | } |
333 | 327 | |
334 | 328 | void |
… |
… |
edit_cmd_new (void) |
337 | 331 | #if HAVE_CHARSET |
338 | 332 | source_codepage = default_source_codepage; |
339 | 333 | #endif |
340 | | do_edit (NULL); |
| 334 | do_edit_at_line (NULL, 0); |
341 | 335 | } |
342 | 336 | |
343 | 337 | /* Invoked by F5. Copy, default to the other panel. */ |
… |
… |
void ext_cmd (void) |
608 | 602 | if (dir == 0){ |
609 | 603 | buffer = g_build_filename (home_dir, MC_USERCONF_DIR, MC_FILEBIND_FILE, NULL); |
610 | 604 | check_for_default (extdir, buffer); |
611 | | do_edit (buffer); |
| 605 | do_edit_at_line (buffer, 0); |
612 | 606 | g_free (buffer); |
613 | 607 | } else if (dir == 1) { |
614 | 608 | if (!exist_file(extdir)) { |
615 | 609 | g_free (extdir); |
616 | 610 | extdir = concat_dir_and_file (mc_home_alt, MC_LIB_EXT); |
617 | 611 | } |
618 | | do_edit (extdir); |
| 612 | do_edit_at_line (extdir, 0); |
619 | 613 | } |
620 | 614 | g_free (extdir); |
621 | 615 | flush_extension_file (); |
… |
… |
edit_mc_menu_cmd (void) |
668 | 662 | return; |
669 | 663 | } |
670 | 664 | |
671 | | do_edit (buffer); |
| 665 | do_edit_at_line (buffer, 0); |
672 | 666 | |
673 | 667 | g_free (buffer); |
674 | 668 | g_free (menufile); |
… |
… |
void edit_fhl_cmd (void) |
692 | 686 | if (dir == 0){ |
693 | 687 | buffer = g_build_filename (home_dir, MC_USERCONF_DIR, MC_FHL_INI_FILE, NULL); |
694 | 688 | check_for_default (fhlfile, buffer); |
695 | | do_edit (buffer); |
| 689 | do_edit_at_line (buffer, 0); |
696 | 690 | g_free (buffer); |
697 | 691 | } else if (dir == 1) { |
698 | 692 | if (!exist_file(fhlfile)) { |
699 | 693 | g_free (fhlfile); |
700 | 694 | fhlfile = concat_dir_and_file (mc_home, MC_FHL_INI_FILE); |
701 | 695 | } |
702 | | do_edit (fhlfile); |
| 696 | do_edit_at_line (fhlfile, 0); |
703 | 697 | } |
704 | 698 | g_free (fhlfile); |
705 | 699 | |