Commit Graph

117 Commits

Author SHA1 Message Date
Ilia Maslakov
5f45920a32 Ticket #1514 (incorrect draw right margin)
fixed incorrect drawind right margin if option show_right_margin = 0

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-01-15 01:29:21 +01:00
Ilia Maslakov
7c2692cf8c add new etitor parameter editor_show_right_margin
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-01-06 14:26:02 +03:00
Ilia Maslakov
5203d6739d Ticket #1514 (show right margin)
* added new color pair EDITOR_RIGHT_MARGIN_COLOR
    * show right margin. Used EDITOR_RIGHT_MARGIN_COLOR color for drawing text beyond rigth edge.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-01-06 14:26:01 +03:00
Vit Rosin
280d7e88f9 change type of some parameters from int to long.
Changed functions:
 * edit_count_lines()
 * edit_move_forward()
 * edit_move_backward()

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-12-25 19:44:34 +02:00
Andrew Borodin
3e12139a94 Editor: some code clean up.
Removed unneeded goto, return, #ifdef.
Type accuracy.
Indentation.
Minor optimization.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-12-16 11:10:41 +02:00
Andrew Borodin
d2e096044d Some speed optimization of editor.
Functions that are called only in one place have been maken inline.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-12-16 11:10:40 +02:00
Andrew Borodin
a193e2e56f Ticket #1831: fixed compilation warings of --disable-nls and --disable-charset options.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-11-20 14:39:51 +03:00
Andrew Borodin
8224a26cf4 ButtonBar optimizations.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Ilia Maslakov
310e2a25c1 Ticket #395
* add scrolled percentage in status bar (like in viewer)
    * make "simple statusbar" more simple

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-10-21 20:12:42 +00:00
Slava Zanko
dd94068a62 Ticket #1649: Prepare for prerelease mc-4.7.0-pre3 (code cleanup)
Try to compile with
{{{
make CFLAGS="-Wall -Werror -Wno-long-long -Wwrite-strings"
}}}

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-09-30 16:42:11 +03:00
Slava Zanko
981fe001d1 Base support of skins.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-09-18 11:49:44 +03:00
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