Ilia Maslakov
6a5dab64fe
add check option persistent_selection if persistent_selection = 0 Tab shift block
2009-05-11 11:34:22 +00:00
Mikhail S. Pobolovets
3784f7253e
Warning fix: 'implicit declaration of function'
...
edit.c:2645:
implicit declaration of function ‘edit_move_block_to_right’
edit.c:2805:
implicit declaration of function ‘edit_move_block_to_left’
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-05-08 13:15:50 +03:00
Ilia Maslakov
20090e0567
fix: error call edit_delete, add needed param.
2009-05-07 10:23:32 +00:00
Slava Zanko
2ebdf91079
Merge branch 'm-utf-8'
...
* m-utf-8: (223 commits)
Fix wildcard pattern in file select and file find dialogs
Project builds with option --disable-charsets
Deleted build-glib1.sh because glib1 don't work with utf-8
fix building without --enable-charset
Total replacement to mc_search stuff in all places
Search engine: if found_len parameter NULL, then mc_search_run don't try to fill them
src/view.c: Reworked search stuff to usage src/search
refactoring: rename edit/editcmd_dialog.c:editcmd_dialog__get_search_types_list to
Search engine: development of hex search complete
Search engine: remove forgotten debug string and reindent file
Search engine:
configure.ac: if present glib-2.14 and higher, libpcre don't linked
Search engine: now used regexp external engines:
src/find.c: Fixed core dump if content search pattern no present
edit/editcmd_dialogs.c: fixed state of search type between dialog window calls
Find files: checkbox 'Regular expression' for content search now default unchecked
Find files: changes for usage of new search engine:
Fix copy of current/opposite path to command line: remove charset info from path
src/Makefile.am: add some header files to Make-tracking
Fixed editor menu reloading.
2009-05-07 13:01:01 +03:00
Slava Zanko
09bc5434f6
Project builds with option --disable-charsets
2009-05-07 12:20:34 +03:00
Ilia Maslakov
079d83c779
fix building without --enable-charset
2009-05-07 07:21:04 +00:00
Slava Zanko
087ef15b1f
Total replacement to mc_search stuff in all places
2009-05-06 19:12:32 +03:00
Slava Zanko
293310f727
refactoring: rename edit/editcmd_dialog.c:editcmd_dialog__get_search_types_list to
...
to src/search/lib.c:mc_search_get_types_strings_array
2009-05-06 10:50:12 +03:00
Slava Zanko
2276e9b513
Search engine: now used regexp external engines:
...
* glib
* pcre
* POSIX regex
External engine selected automatically, if present.
2009-05-05 16:19:32 +03:00
Slava Zanko
301435b374
edit/editcmd_dialogs.c: fixed state of search type between dialog window calls
2009-05-05 11:31:57 +03: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
e12b9e50db
edit/editcmd.c, edit/editcmd_dialigs.c: added 'search in all charsets' feature
...
src/search/search.c: fixed error with multicharset search
2009-04-30 16:58:28 +03:00
Slava Zanko
15b2d19428
Search engine: fix errors with backward regex-search
2009-04-30 14:21:39 +03:00
Slava Zanko
5e08dbbe76
edit/editcmd_dialogs.c: types of search now show as radiobuttons
2009-04-30 13:46:33 +03:00
Slava Zanko
3e2c3ebb5e
Move replace confirm dialog into editcmd_dialogs.c
2009-04-30 12:45:02 +03:00
Slava Zanko
602f3c5796
Search engine: backward search now works
2009-04-30 12:35:24 +03:00
Slava Zanko
def581b24d
Search engine:
...
* add function for prepare replacement string
edit/editcmd.c:
* changes for correct replace
WARNING! replace don't fully works!
2009-04-29 18:45:21 +03: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
Slava Zanko
d2e62a5c87
src/wtools: add callback functions for buttons to QuickWidget structure
2009-04-29 14:07:09 +03:00
Ilia Maslakov
5e5df48951
fix: vertical insetrion UNDO on UTF-8 text.
2009-04-29 07:35:00 +00:00
Ilia Maslakov
3020c5573d
fix UNDO:
...
revert void edit_cursor_move to original.
add void edit_right_char_move_cmd (WEdit * edit)
add void edit_left_char_move_cmd (WEdit * edit)
replace edit_cursor_move call to edit_left_char_move_cmd/edit_right_char_move_cmd in edit_execute_cmd (on key press LEFT/RIGHT)
2009-04-29 07:06:27 +00:00
Ilia Maslakov
2a52039fae
fix: edit UNDO after delete, backspace on UTF-8 chars
2009-04-28 18:58:57 +00:00
Ilia Maslakov
a023d66b86
fix: incorrect UNDO in core editor on UTF-8 files.
2009-04-28 12:47:23 +00:00
Ilia Maslakov
52a2f5379e
fix: draw cursor on non-utf-8 console if a character is typically rendered in a double-width cell.
2009-04-27 12:16:53 +00:00
Ilia Maslakov
093d4c7e7a
fix: incorrect draw cursor if a character is typically rendered in a double-width cell.
...
(East Asian utf-8 chars)
2009-04-27 12:08:36 +00:00
Slava Zanko
b2442d1b1e
Reorganize source structure: move search engine files into src/search subdir
2009-04-25 10:25:13 +03:00
Slava Zanko
10b7bdb361
Project now build with:
...
make CFLAGS="-ansi -pedantic -Wall -Wextra -Werror"
WARNING! Builds wuthout samba.
2009-04-24 01:47:22 +03:00
Slava Zanko
1d18f3227e
edit/editcmd.c:
...
* Fix encoding in replace confirm dialog
* Correct handle error codes from search engine
2009-04-23 17:46:38 +03:00
Slava Zanko
ea2740059b
edit/editcmd.c: Replace now worked with new search engine (just simple mode search)
2009-04-23 17:28:07 +03:00
Slava Zanko
9db1cf46a4
Continue develop of search engine: simple search now worked
2009-04-23 15:46:06 +03:00
Slava Zanko
8fb216e732
Continue develop of mc_search module.
...
* Fix init of global variables cp_source and cp_display
* add property (mc_search_t*) search to WEdit srtucture
* start of reorganize edit/editcmd.c for new search engine
2009-04-23 14:30:14 +03:00
Andrew Borodin
4e64ee3b8d
edit/editcmd.c (edit_search_cmd): removed redundant code.
2009-04-22 06:19:20 +04: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
990838a226
fix: draw in core editor 8-bit locale and UTF-8 source
2009-04-21 21:27:42 +00:00
Slava Zanko
76bbeb60b2
Fixed search with different display and source charsets
2009-04-21 14:19:42 +03:00
Slava Zanko
356b501bdc
revert commit No. e19de53a06
"change addch to addstr"
2009-04-21 11:51:24 +03:00
Ilia Maslakov
e19de53a06
change addch to addstr
2009-04-20 20:18:12 +00:00
Ilia Maslakov
83c10b2f6e
fix: build without charsets
2009-04-20 19:10:33 +00:00
Ilia Maslakov
202ec6d78f
fix: incorrect show and input capitalize chars in UTF-8 locale and 8-bit source
2009-04-20 14:46:22 +00:00
Ilia Maslakov
cc54a2083b
change check S-LANG for use addch()
2009-04-20 10:56:31 +00:00
Ilia Maslakov
571ed66b76
fix: utf-8 output in editor with use ncurses
2009-04-20 10:26:14 +00:00
Slava Zanko
dd07d30c0b
Fix coredump with jumps to function definition/declaration
2009-04-20 13:35:09 +03:00
Ilia Maslakov
78b7678845
Merge branch 'm-utf-8' of ssh://angel_il@midnight-commander.org:2222/git/mc into m-utf-8
2009-04-20 09:03:04 +00:00
Ilia Maslakov
4725fe329c
fix: edit in 8-bit locale UTF-8 source
2009-04-20 09:01:47 +00:00
Slava Zanko
303cec8cb6
Supress compiler warnings. Now able to compile project with
...
make CFLAGS=-Werror
2009-04-20 11:10:06 +03:00
Ilia Maslakov
7494db39ed
clear some build warnings
2009-04-20 07:30:32 +00:00
Ilia Maslakov
9d855b3253
fix: build without HAVE_CHARSET
2009-04-20 05:51:32 +00:00
Ilia Maslakov
a4b354f99c
fix: incorret draw files in 8-bit codeset after recode
2009-04-19 20:28:00 +00:00
Ilia Maslakov
b87edfdc26
fix: input in 8-bit locales
2009-04-19 12:18:18 +00:00
Ilia Maslakov
d8175b3e6b
fix: incorrect input
2009-04-18 14:50:05 +00:00
Slava Zanko
6568cad9df
Fixies for search stuff in editor.
...
src/charsets.c:
* fix error with recoding string for display
edit/editcmd.c:
* fix core dump if search dialog calls some multiple times
* fix memory leak
2009-04-17 18:08:51 +03:00
Slava Zanko
95e2fb90ef
Fix search with 8-bit system codepage in utf-8 text codepage
2009-04-17 17:05:19 +03:00
Slava Zanko
ea30fa7d88
Merge branch 'm-utf-8' of ssh://www.midnight-commander.org:2222/git/mc into m-utf-8
...
* 'm-utf-8' of ssh://www.midnight-commander.org:2222/git/mc:
fix: incorrect convert_from_utf_to_current_c, convert_from_utf_to_current
2009-04-17 15:02:41 +03:00
Slava Zanko
3802929f94
edit/editcmd.c: Fixed search and replace with scanf-search
2009-04-17 15:01:25 +03:00
Ilia Maslakov
137e3e7259
fix: incorrect convert_from_utf_to_current_c, convert_from_utf_to_current
2009-04-17 10:27:59 +00:00
Slava Zanko
0730efa2fc
Merge branch 'm-utf-8' of ssh://www.midnight-commander.org:2222/git/mc into m-utf-8
...
* 'm-utf-8' of ssh://www.midnight-commander.org:2222/git/mc:
fix by andrew_b uninitialised tool->compose.
fix incorrect draw utf-8 text in 8-bit locale
fix some warnings
add convert_from_utf_to_current_c, fix little warnings
add utf8_display global variable, if display bits select utf-8 utf8_display = 1
add more convertion before draw text
change charbuf to char from unsigned char
add: convert input in utf locale to needle
fix incorrect convertion from utf to display CP
fix: width utf buffer
add in core viewer codepage selection from list
fix: editor status bar
fix: edit_get_prev_utf segfault, add compare str with start of buf
Conflicts:
edit/edit.h
2009-04-17 11:52:20 +03:00
Slava Zanko
1e5a201abd
Temporary commit. Half-fix searching.
...
Not fixed search by regexp.
2009-04-17 11:46:06 +03:00
Ilia Maslakov
8767909493
fix incorrect draw utf-8 text in 8-bit locale
2009-04-17 06:17:37 +00:00
Ilia Maslakov
42eba5c18c
fix some warnings
2009-04-16 21:28:02 +00:00
Ilia Maslakov
d4148989ed
add more convertion before draw text
2009-04-16 21:17:58 +00:00
Ilia Maslakov
c03c4de5cc
change charbuf to char from unsigned char
2009-04-16 21:14:48 +00:00
Ilia Maslakov
9cb41f7b43
Merge branch 'm-utf-8' of ssh://angel_il@midnight-commander.org:2222/git/mc into m-utf-8
2009-04-16 16:38:05 +00:00
Ilia Maslakov
2ce1042665
add: convert input in utf locale to needle
2009-04-16 15:12:33 +00:00
Ilia Maslakov
0934b0643a
fix: width utf buffer
2009-04-16 15:09:19 +00:00
Slava Zanko
ac8ae55181
Fix conflicts after rebasing
2009-04-16 13:24:47 +03:00
Ilia Maslakov
7658246c35
fix: editor status bar
2009-04-16 13:14:30 +03:00
Ilia Maslakov
7bcb0b1930
fix: edit_get_prev_utf segfault, add compare str with start of buf
2009-04-16 13:14:29 +03:00
Ilia Maslakov
2fdb3689e2
fix: with status_string on utf-8 char
2009-04-16 13:14:29 +03:00
Andrew Borodin
dd6e11fa9c
Unification of widgets API.
...
widget.h: chaged paremeters order of listbox_new()
and groupbox_new() functions.
widget.c: likewise.
src/achown.c: sync with modified API of WListbox and WGroupbox widgets.
src/boxes.c: likewise.
src/chown.c: likewise.
src/complete.c: likewise.
src/find.c: likewise.
src/hotlist.c: likewise.
src/layout.c: likewise.
src/listmode.c: likewise.
src/option.c: likewise.
src/panelize.c: likewise.
src/wtools.c: likewise.
edit/editcmd.c: likewise.
2009-04-16 13:14:29 +03:00
Ilia Maslakov
83b2c8406f
fix move backward and backspace.
2009-04-16 13:14:29 +03:00
Slava Zanko
8e6a6e48b6
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-16 13:14:28 +03:00
Mikhail S. Pobolovets
1959b42fdc
Merge branch '252_doxygen_desc_src'
...
Conflicts:
src/file.h
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-04-16 08:26:52 +03:00
Ilia Maslakov
38c7e229d5
fix: editor status bar
2009-04-15 20:08:44 +00:00
Ilia Maslakov
4374fd4ea5
fix: edit_get_prev_utf segfault, add compare str with start of buf
2009-04-15 19:07:46 +00:00
Ilia Maslakov
a71e58bcdb
Merge branch 'm-utf-8' of ssh://angel_il@midnight-commander.org:2222/git/mc into m-utf-8
2009-04-15 18:17:26 +00:00
Ilia Maslakov
13986ea0af
fix: with status_string on utf-8 char
2009-04-15 18:14:17 +00:00
Andrew Borodin
004bc0077e
Unification of widgets API.
...
widget.h: chaged paremeters order of listbox_new()
and groupbox_new() functions.
widget.c: likewise.
src/achown.c: sync with modified API of WListbox and WGroupbox widgets.
src/boxes.c: likewise.
src/chown.c: likewise.
src/complete.c: likewise.
src/find.c: likewise.
src/hotlist.c: likewise.
src/layout.c: likewise.
src/listmode.c: likewise.
src/option.c: likewise.
src/panelize.c: likewise.
src/wtools.c: likewise.
edit/editcmd.c: likewise.
2009-04-15 20:22:26 +04:00
Ilia Maslakov
960b1ef89d
fix move backward and backspace.
2009-04-15 13:56:19 +00:00
Ilia Maslakov
3236fe285c
fix: segfault in 'edit_save_confirm_cmd', g_free non allocated memory
2009-04-14 20:41:41 +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
Ilia Maslakov
21c88729a4
fix edit_delete, edit_backspace now work with utf-8
2009-04-14 06:07:35 +00:00
Ilia Maslakov
4411af46bb
fix incorrect move cursor after left/right key pressed
2009-04-14 05:56:02 +00:00
Ilia Maslakov
b6ae0a2479
fix cursor in editor on utf-8 files
2009-04-13 15:33:21 +00:00
Ilia Maslakov
95edc18aa8
add char charbuf[], int charpoint for multibyte input
...
add edit_get_byte_ptr for get pointer to edit current position in buffer
add edit_get_buf_ptr pointer in start of edit buffer
fix edit_translate_key for multibyte input
add
2009-04-13 15:19:06 +00:00
Ilia Maslakov
13f13c1fb0
fix incorrect edit_draw_this_line, edit_get_utf.
...
utf-8 text now showed correct
2009-04-13 09:28:07 +00:00
Ilia Maslakov
f45e7d1dc6
fix: edit_draw_this_line iterators. iterators += utf8char_width
...
fix: edit.c edit_get_utf correct calculate utf8char width
2009-04-13 06:55:43 +00:00
Ilia Maslakov
d29c5d6d5f
reworked: edit_get_utf return int value is utf-8 char, char_width
2009-04-12 19:16:52 +00:00
Ilia Maslakov
7d7560deea
Change print_to_widget, edit_draw_this_line to use struct line_s line[].
...
Extract color attibutes from char to lines->style.
Add definition struct line_s:
struct line_s {
unsigned int ch; <- textchar
unsigned int style; <- color attr
};
2009-04-12 08:09:00 +00:00
Ilia Maslakov
b5c4a9ddf2
add str_isutf8 return 1 if codeset_name is utf8 or utf-8
...
add unsigned int utf8:1 to struct WEdit if utf8 then file multibute codeset
2009-04-09 14:23:08 +00:00
Ilia Maslakov
36bf010af6
add function edit_get_utf_char
2009-04-09 12:04:30 +00:00
Ilia Maslakov
8725fa60a8
add to status bar source codepage
2009-04-09 08:40:59 +00:00
Ilia Maslakov
a93bb95872
Merge branch '303_block_shift_unshift'
...
* 303_block_shift_unshift:
Add edit_move_block_to_left, edit_move_block_to_right procedure for shift block.
Add edit_move_block_to_left, edit_move_block_to_right procedure for shift block. Tab: if block selected, shift block to right, M-Tab(complete): if block selected, shift block to left. Remove "static" from insert_spaces_tab.
2009-04-06 21:17:55 +00:00
Ilia Maslakov
f845e4b569
revert to strlen in edit_find_filter
2009-04-06 12:45:35 +00:00
Ilia Maslakov
bfa9c961ca
replace isupper to g_ascii_isupper
2009-04-06 11:04:02 +00:00
Ilia Maslakov
87a891a54c
replace islower to g_ascii_islower
...
replace tolower to g_ascii_tolower
2009-04-06 10:58:33 +00:00
Ilia Maslakov
5be16e2a0b
replace name_trunc to str_trunc
2009-04-06 10:38:35 +00:00
Ilia Maslakov
b0729f75fb
replace isalpha to g_ascii_isalpha
...
replace strlen to str_term_width1
add #include "strutil.h" if need
2009-04-06 10:31:12 +00:00
Ilia Maslakov
3b5e2c052f
Merge branch 'utf-8' into master
...
resolve conflicts:
configure.ac
src/complete.c
src/file.c
src/layout.c
src/main.c
src/menu.c
src/screen.c
src/util.c
src/widget.c
src/widget.h
2009-04-04 19:50:46 +00:00
Ilia Maslakov
3a161f9576
fix: problem when flag Persistent selection swiched off then text not marked
...
by F3 + arrows
2009-03-31 10:39:00 +00:00
Ilia Maslakov
a8eb299506
Fix: defult value of option_persistent_selectionsis, set "yes" by default.
2009-03-28 09:46:07 +00:00