Commit Graph

665 Commits

Author SHA1 Message Date
Daniel Borca 2a586710b7 Ticket #1496 (Search backwards is broken)
fix: file edit/editcmd.c backward search is broken
2009-08-12 15:04:37 +03:00
Sergei Trofimovich 65771004c4 Ticket #82 (savannah: "save as" retains mode) patch by imdagger
Consider following scenario:
$ touch /tmp/foo_file
$ chmod 0444 /tmp/foo_file # readonly for owner
$ mcedit /tmp/foo_file
> 1. edit
> 2. try to save, fail. choose another name: /tmp/foo_file2
> 3. edit
> 4. try to save, fail again!

This patch adds owner write permissions for files, created in
step 2.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-08-09 19:24:42 +03:00
Daniel Borca 556089fc9f Ticket #1478 (kill word)
add: "kill word" (M-d) shortcut in editor;
2009-08-08 12:48:24 +00:00
Ilia Maslakov 00200124dd Ticket #1411 (issue insertion in overwite mode)
fix: issue insertion in overwite mode
2009-08-06 10:18:08 +00:00
Ilia Maslakov 99c8f6a680 Ticket #1460 (shared search history)
* The sample of the containing text by file search;
    * The sample of search in file mcview;
    * The sample of search in mcedit (search operation);
    * The substituting text in mceditor (replacement operation).

    Author: Alexey Korop

    Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

    Editor: search will continue from last search string if SHIFT+F7 hotkey pressed
    at first time (without pressed F7 key).

    Signed-off-by: Slava Zanko <slavazanko@gmail.com>

    add const MC_HISTORY_SHARED_SEARCH into history.h

    Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-08-05 14:30:08 +00:00
Slava Zanko f67fcfb94f Fixed excaping of '%' symbol in edit_complete_word_cmd() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-17 12:00:03 +03:00
Patrick Winnertz 2a9faab6e4 Fix compiler warning about different signedness of pointers in editcmd.c
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-07-17 12:00:01 +03:00
Patrick Winnertz bada6849cd Remove unneeded vars in edit/edit.c to avoid compiler warnings
Signed-off-by: Patrick Winnertz <winnie@debian.org>

edit: cleanup: moved variable declaration to begin of block
edit: have_charset: added explicit variable declarations

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>

fix not initialized variable 'cw'
fix variables 'cw', 'utf_ch', make more safety algorithm.
2009-07-17 12:00:01 +03:00
Ilia Maslakov 3596ceeb9f Ticket #1402 (mcedit replace regression)
fix: issue in 'while'
    remove 'Once' button as 'atavism'
    add 'from' field in confirm dialog

Fixed layout of place confirmation dialog in mcedit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-07-16 05:42:36 +00:00
Ilia Maslakov 348ab7303f Ticket #1384 (Whitespace highlighting should be optional)
Add Denis Vlasenko patch for draw options in dialog
    Add hotkey M-S-<minus> as swicher for show tabs and tws
2009-07-07 05:53:52 +00:00
Mikhail S. Pobolovets 9e92f803cc FIX: Completion in editor doesn't work with subwords ended with '_'
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-06-29 14:14:25 +03:00
Ilia Maslakov 9283c14213 Ticket #1376 (TAGS parser crashes)
fix: incorrect parse invalid input parameters in etags_set_definition_hash
2009-06-24 14:26:37 +00:00
Ilia Maslakov 522f310871 Ticket #1368 (Incorrect detected start of the word)
fix: removed char "_" in edit_find_word_start as SOW (start of the word)
add more chars as SOW
2009-06-22 12:34:00 +00:00
Slava Zanko 644c537084 Ticket #383 (Autocompletion in editor don't work)
Description:

Autocomplete doesn't find the word at the begin of file.

Fix issue: search words for autocomplete start with 1 byte offset (start=0 was mean start=1)
Now fixed. Also, removed forgot debug code.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-19 22:06:41 +03:00
Slava Zanko a13d36a55c Autocomplete in editor now works with all words, not only a-zA-Z
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-19 22:06:41 +03:00
Slava Zanko 5ab3ba58c9 Fixed autocompletion in editor
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-19 22:06:41 +03:00
Andrew Borodin 68354273a3 Fixed includes.
Added missed includes. Fixed includes after rebase.

Signed-off-by: Andrew Borodin <borodin@borodin.zarya>
2009-06-19 14:36:36 +04:00
Andrew Borodin 9ef324f7bb edit/edit.h: added function prototypes.
edit/editcmd.c: removed include of eregex.h
vfs/vfs-impl.h: removed commented include of <stddef.h>.
2009-06-18 21:08:24 +04:00
Andrew Borodin 75bf9897f0 Removed unnecessary #include directives and USE_INTERNAL_EDIT define. 2009-06-18 21:03:14 +04:00
Enrico Weigelt, metux IT service b09a107190 further include file fixups 2009-06-18 21:02:29 +04:00
Enrico Weigelt, metux IT service c7d04dd47a fixed several missing #include's 2009-06-18 21:02:29 +04:00
Ilia Maslakov 5c28d2bda4 Ticket #321 (Trouble with mc's clipboard paste)
add: paste as vertical block if clipfile contain magic sequence
add: vertical paste from file
add: symbolic definition MAGIC_VERTICAL for "\1\1\1\1\n" magic sequence
2009-06-17 13:12:03 +00:00
Andrew Borodin 0c51aa5ae1 Fixed missed declaration of simple_statusbar variable. 2009-06-16 15:36:45 +04:00
Andrew Borodin 6999a6123b Fixed comments and copyright info. 2009-06-16 15:36:45 +04:00
Andrew Borodin fd09abaeb2 Hide private API of editor (#361).
All editor private API stuff is located now in edit/edit-impl.h.
Public API is located in edit/edit.h.
Added functions to read some fields of WEdit struct.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-06-16 15:36:45 +04:00
Andrew Borodin efbbd3883f Fixed source_codepage handling in editor (#402).
Signed-off-by: Andrew Borodin <borodin@borodin.zarya>
2009-06-16 11:32:59 +04:00
Andrew Borodin 6e86e9f383 Fixed type of variables that store result of get_codepage_id(). 2009-06-15 23:35:20 +04:00
Andrew Borodin 205fa24e7d Fixed codepage selection (#402).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-06-15 20:27:17 +04:00
Ilia Maslakov 2dffac596d Merge branch '327_simple_editor_status'
* 327_simple_editor_status:
  Simple statusbar mode for editor.
2009-06-14 18:25:27 +00:00
Ilia Maslakov 2f8e7cae7a Ticket #404 (Need more action in Editor menu)
add entries for many action:

 menu Edit
   * Copy to clipfile
   * Cut to clipfile
   * Paste from clipfile
   * Toggle bookmark
   * Next bookmark
   * Prev bookmark
   * Flush bookmark
 menu Command
   * Find declaration
   * Back from declaration
   * Forward to declaration

add show shortcuts for copy/cut/paste clipfile
2009-06-14 17:17:32 +00:00
Sergei Trofimovich f5dce266fe Merge commit 'origin/340_inrorrect_handling_of_wildcards'
* commit 'origin/340_inrorrect_handling_of_wildcards': (21 commits)
  Fixed work with copying/moving files by mask into subdirs
  Fixed bug with copying files/dirs into directory with 'wild' name (such as ${}, \1, etc.)
  Fixed patterns escaping of wild filenames (such as \1, ${1}, \U, etc).
  Removed unused debug code from src/filegui.c
  Refactoring: renamed variable 'loop' into 'curr_index'
  Changed defined constants to static const char[] declarations.
  Fixed declarations of functions. May be, need to split with previous commmit...
  Reworked functions strutils_shell_escape and strutils_shell_unescape
  Renamed functions shell_escape (to strutils_shell_escape) and shell_unescape (to strutils_shell_unescape)
  Just identation of some source files
  Renamed function shell_is_char_escaped to strutils_is_char_escaped; removed function mc_search_is_char_escaped
  Moved 'escape' and 'unescape' strings functions from src/util.[ch] into src/strescape.[ch]
  Fixed crash if replace group ${N} used into replace string
  Some cosmetic optimisation for less code :)
  Fixed searched token in source file mask.
  Fixed NULL acertion if replacement don't correct
  Handle new search replace behaviour into src/file.c. Also fixed filemask into src/filegui.c
  Search Replace now handled \U,\u,\L,\l and \E modificators.
  Just identation of regex.c and search.h
  search engine: Added new syntax for replace tokenks.
  ...
2009-06-12 23:02:44 +03:00
Ilia Maslakov b955d8c2ff Merge branch '318_alt_arrows_select_block'
* 318_alt_arrows_select_block:
  Add esc sequencies to src/key.c for xterm
2009-06-12 14:53:04 +00:00
Andrew Borodin 0bfd10f4c6 edit/editmenu.c: added separator in 'Options' submenu. 2009-06-12 17:30:21 +04:00
Ilia Maslakov f4844e5b21 Add esc sequencies to src/key.c for xterm
Add CK_*_Alt_Highlight commands in edit/editcmddef.h
Add processing for CK_*_Alt_Highlight commands in edit/edit.c
2009-06-12 12:54:52 +00:00
Slava Zanko e335712e41 Fix path to Syntax file
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-12 16:12:10 +04:00
Andrew Borodin 5241c7a5d4 src/main.c: don't display "Encoding..." menu entry if charsets support is
disabled.

edit/editmenu.c: edded "Encoding..." menu entry to the "Command" submenu.
Display it if charsets support is enabled.
2009-06-12 16:12:10 +04:00
Andrew Borodin a623c3a13c Editor: sync with new global config location (user menu and syntax files). 2009-06-12 16:12:10 +04:00
Andrew Borodin fb48d4a295 Small reorganization of MC and Editor menus.
The 'User Menu' entry is moved from 'File' submenu to 'Command' one.
The 'Edit editor menu file' and 'Edit syntax file' entries are moved
from main MC menu ('Command' submenu) to editor main menu ('Options'
submenu) and renamed.

src/cmd.c (check_for_default): moved to util.c and maken global.
(menu_edit_cmd): rewritten to handle MC menu files only and renamed
to edit_mc_menu_cmd.
Editor relevant routines are moved to editor code.

src/cmd.h: cleanup.

src/main.c: main menu reorganization.

src/user.h: moved editor macros to edit/edit.h.

src/util.c, src/util.h: check_for_default function from src/cmd.h.
Rewritten to use exist_file() function.

edit/editcmddef.h: added new commands:
CK_Load_Syntax_File and CK_Load_Menu_File.

edit/edit.h: editor file macros from src/user.h.
New type for file which is currently being edited.
Modified edit_load_cmd function to be more advanced.

edit/edit.c (edit_execute_cmd): handle new commands:
CK_Load_Syntax_File and CK_Load_Menu_File.

edit/editmenu.c: menu reorganization: moved two entries here from main
MC menu. Added requireq handle functions. Small optimization: removed
extra layer in menu entry handlers.

edit/editcmd.c: menu and syntax files edit is implemented.
Modified edit_load_cmd function to be more advanced.
2009-06-12 16:12:10 +04:00
Slava Zanko cf13c588d7 Fix encoding of newly created files in editor
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-12 10:31:57 +03:00
Slava Zanko e9a644219a Fix encoding of newly created files in editor
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-11 12:59:46 +03:00
Mikhail S. Pobolovets 546b30008a Simple statusbar mode for editor.
Full mode:
    TODO [----] 2 L:[ 1+ 0 1/333] *(2 /11838b)= 102 0x066 cp:Other_8_bit

Simple mode:
    TODO [----] 2 1/333 (2 /11838b) 102 0x066 Other_8_bit

    modified:
        * edit/edit.h
        * edit/editdraw.c
        * src/setup.c

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-05-28 10:40:54 +03:00
Slava Zanko abcd23406d remove ChangeLog files from mc tree
Description by Sergei Trofimovich:

GNU ChangeLog? files are result of CVS stupidpity about changeset tracking.
Currently constantly updated ChangeLogs? diverge in different branches and cause collisions(!)
when 'git merge' (almost ANY SINGLE MERGE!).

Major changes can be described in NEWS file, minor changes can be autogenerated via 'git log'/'git shortlog'
and friends (if needed at all).
2009-05-27 14:53:23 +03:00
Slava Zanko 17343149d6 Remove 'All charsets' checkbox from all search dialogs when specified '--disable-charsets' configure option 2009-05-27 12:20:21 +03:00
Slava Zanko 89bdeb7e34 edit/editcmd.c: fix backward search by one symbol. 2009-05-27 11:49:36 +03:00
Slava Zanko 8841747560 edit/syntax.c: fixed path to Syntax file 2009-05-22 10:53:02 +03:00
Slava Zanko 0c17219b2a Move global config files from pkg_datadir to sysconfdir
* Also fixed 'make dist' command
 * changed contrib/dist/redhat/mc.spec.in for builds with new dir
2009-05-21 01:01:10 +03:00
Ilia Maslakov f8a487de01 Merge branch '351_show_number_line'
* 351_show_number_line:
  fix hotkey menu entry "Toggle li&ne state" now highlighted "n"
  add call CK_Toggle_Line_State to edit menu
  show line number in left part of screen (hotkey alt-n)
2009-05-14 07:57:51 +00:00
Ilia Maslakov e9fe86f149 fix hotkey menu entry "Toggle li&ne state" now highlighted "n" 2009-05-13 09:00:49 +00:00
Slava Zanko dd27f52286 Merge branch '352_add_XZ_compression_support'
* 352_add_XZ_compression_support:
  Added XZ compression support. Signed-off-by: xgizzmo <xgizzmo@slackbuilds.org>
2009-05-13 11:35:54 +03:00
xgizzmo 24ca27fe30 Added XZ compression support. Signed-off-by: xgizzmo <xgizzmo@slackbuilds.org>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-05-13 11:35:22 +03:00