Bug: in lock_extract_info() number of unicode characters
is used as number of bytes in string.
Now strlen() is used instead of str_term_width() to calculate
string length. String length is calculated only one time.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* moved src/fileloc.h into lib/fileloc.h
* moved src/timefmt.h into lib/timefmt.h
* removed unneedded includes into src/util.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* moved src/global.h into lib/global.h
* moved glibcompat.[ch] from ./src/ into ./lib/
* moved fs.h from ./src/ into ./lib/
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Test case:
* run mc
* Select F9 => 'Left/Right' => 'Listing mode...'
* [x] user Mini status
* enter below: 'half type name | size+ | perm'
* Press [< OK >] button
Fix issue: alloc new block of memory with initialization (filled by zero)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
If symbolic link has a long name, the input line in 'Edit symlink'
dialog window is short. This bug is reproduces in non-C locales (KOI8-R,
UTF-8, etc).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Now viewer save/load only 'offset' and 'line' always = -1.
Changed editor edit_load_position, edit_save_position,
now if 'line' = -1 then used 'offset'
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
remowed all no needed calls of mcview_offset_to_coord and mcview_coord_to_offset
added mcview_eol, mcview_bol for navigate in current file
thanx Nikita Ofitserov <himikof@gmail.com> for the patches and testing
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Reimplemented some of coordinates cache internals.
Array is used instead of GList. If needed, array is reallocated.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The Start at prompt is filled with garbage every time
the Tree option is entered in the Find dialogue.
To reproduce:
1. M-? to open Find dialogue
2. not that the Start at prompt is empty
3. press M-T or navigate to Tree button and press enter
4. you see tree view, press ESC
5. the Start at prompt is filed by garbage
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The latest version breaks transparency support.
If I'd change _default_ to lightgray;default in the [core] section, the panels are unreadable.
It looks like the _default_ variable interpreted as lightgray;lightgray.
Fix Issue: do not apply COLOR_WHITE as mask if color value equal to -1
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
If viewer is in wrap mode, there is an expta empty line
in wrapped line. This bug was introduced in
8c84095ae1 commit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Starting mc with:
LANG=C mc
cases a crash when mc exits. No other LC_* variable was set.
The issue is in src/strutil.c module. With C locale, str_init_strings()
fails to set str_cnv_not_convert variable leaving it with value -1
(INVALID_CONV). str_uninit_strings() passes str_cnv_not_convert blindly
to g_iconv_close() which tries to dereference it.
This commit adds a check to str_uninit_strings() if str_cnv_not_convert
value is valid.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>