Commit Graph

106 Commits

Author SHA1 Message Date
Ilia Maslakov
7e13f0a5c1 edit/editdraw.c: removed unused variable
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-08-24 09:31:26 +04:00
Ilia Maslakov
46eccd1102 Ticket #61 (Misbehaving rectangular select in editor)
fix: incorrect draw rectangular selection if start highlight from first line.
Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-08-21 13:42:29 +00:00
Ilia Maslakov
c7001ef7cf Ticket #1484 (Editor bookmarks made visible)
fix: TWS and abnormal chars not highlighted

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-08-18 11:30:12 +00:00
Daniel Borca
9f2034d376 Ticket #1484 (show bookmark)
* add keyboard shortcuts
    * add showing bookmarks

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

    * show '*' for bookmarked line (if line state showed)

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-08-18 10:05:50 +00:00
Daniel Borca
ea219adec3 Ticket #1412 (vertical selection issue)
fix: vertical selection issue then line state is switch on

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-08-18 06:13:01 +00:00
Ilia Maslakov
4afee14f94 Ticket #1529 (remove search converter overhead)
* add: void tty_print_anychar (int c)
    * remove superfluous search converter in convert_from_utf_to_current_c,
      convert_from_8bit_to_utf_c add converter to WEdit struct
    * fix: init defaulf codesets
    * fix: segfault on replace if LANG=C

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-08-18 05:52:40 +00:00
Ilia Maslakov
f4fc6ad79d Ticket #1534 (cool cooledit)
first commit for support drag cursor after end of line

    * change mouse movement, allow place cursor after EOL
    * change vertical select
    * fix: right scroll

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-08-17 18:11:20 +00:00
Andrew Borodin
509f4d5c4f TTY: fixes after rebase.
Code clean up.
Modification of tty_refresh for NCurses: call doupdate() after refresh()
every time.
tty_draw_box_slow() is not private function of TTY now.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-12 21:23:54 +04:00
Andrew Borodin
30fd7fc34a TTY: modified line drawing. 2009-08-12 21:23:13 +04:00
Andrew Borodin
fe1adb5f27 tty_print_char() function is used instead of addch() one.
Modified tty_print_char() function for S-Lang library to use it
instead of addch().
2009-08-12 21:23:12 +04:00
Andrew Borodin
26631548d8 Fixed TTY sublayer after rebase to current master. 2009-08-12 21:23:12 +04:00
Andrew Borodin
c12ddff69b Reorganization of TTY color functions. 2009-08-12 21:23:12 +04:00
Andrew Borodin
7a75f8723d Replaced addstr() call to tty_print_string() one. 2009-08-12 21:23:12 +04:00
Andrew Borodin
ebbf6fbcdc Replaced functions.
attrset() -> tty_setcolor()
move() -> tty_gotoyx()
getyx() -> tty_getyx()
2009-08-12 21:19:20 +04:00
Andrew Borodin
ea0cb38b9e Initial step to split NCurses- and SLang-based TTY layers. 2009-08-12 21:19:20 +04:00
Andrew Borodin
f3730bdc41 Initial step to move TTY layer of MC to separate library. 2009-08-12 21:19:20 +04: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
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
Enrico Weigelt, metux IT service
b09a107190 further include file fixups 2009-06-18 21:02:29 +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
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
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
854f214563 show line number in left part of screen (hotkey alt-n)
add option editor_line_status to ini (src/setup.c)
    add action CK_Toggle_Line_State (edt/editcmddef.h)
    change "print_to_widget()" to show line state, if option_line_state = 1 show line num (edit/editdraw.c)
    change "edit_draw_this_line()", (set line state: line num, etc)
    add const LINE_STATE_WIDTH, add options: option_line_state, option_line_state_width (edit/edit.h)
    add switch on/off show line number (edit/edit.c)
    add CK_Toggle_Line_State to translation table command_names (bindings name is Toggle-Line-State).
    add const LINE_STATE_COLOR for draw left area bar line state
    add color pair "editlinestate" for set in ini
    add help for keyword "editlinestate" on "mc --help-color" (src/main.c)
2009-05-13 07:09:47 +00:00
Ilia Maslakov
427ecef234 fix mark tab and spaces 2009-05-12 14:14:27 +00:00
Ilia Maslakov
7fbff4fa86 fix highlight tab and spaces in mark procces. 2009-05-12 10:06:37 +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
10b7bdb361 Project now build with:
make CFLAGS="-ansi -pedantic -Wall -Wextra -Werror"

WARNING! Builds wuthout samba.
2009-04-24 01:47:22 +03: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
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
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
137e3e7259 fix: incorrect convert_from_utf_to_current_c, convert_from_utf_to_current 2009-04-17 10:27:59 +00:00
Ilia Maslakov
8767909493 fix incorrect draw utf-8 text in 8-bit locale 2009-04-17 06:17:37 +00:00
Ilia Maslakov
d4148989ed add more convertion before draw text 2009-04-16 21:17:58 +00:00
Ilia Maslakov
38c7e229d5 fix: editor status bar 2009-04-15 20:08:44 +00:00
Ilia Maslakov
13986ea0af fix: with status_string on utf-8 char 2009-04-15 18:14:17 +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
8725fa60a8 add to status bar source codepage 2009-04-09 08:40:59 +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
Mikhail S. Pobolovets
6a209bdb59 Simple doxygen description for files in edit directory.
Mostly \file and \brief tag added.
Some fixes for warnings with existing comments.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-02-10 16:07:59 +02:00