* commit 'origin/2287_persistent_bookmarks':
Fix in lib/logging.c for proper work on 64-bit platforms.
Change of bookmark drawing.
Fixed memory leak: destroy serialization bookmarks if file position is not saved.
Use GArray for bookmarks instead of raw array.
Minor optimization, type accuracy, includes fix.
Ticket #2287 (mcedit: persistent bookmarks)
* 2137_panel_encoding_without_vfs:
Get rid of some '#ifdef ENABLE_VFS' conditions.
Fix of file panel encoding change w/o VFS support.
Cleanup of includes in VFS sources.
Ticket #2137: cannot change panel encoding without VFS support
Now --disable-vfs doesn't mean the total disabling of VFS.
With --disable-vfs option, the localfs module is built
to use the change of file panel encoding.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 1512_panel_codepage:
Minor changes: added doxy-comments for functions:
Fix of VFS encoding parsing.
Remove only supported encodings from path.
Don't add current encoding to path again.
Created macro VFS_ENCODING_PREFIX for "#enc:" encoding prefix.
When cd to "..", remove encoding at the end of path.
Added codepage member to the WPanel struct.
Minor optimization of panel_new_with_dir().
Load codepage list before loading of configuration.
Don't push directory to history twice. Unified error message.
Ticket #1512: panel encoding is not shown correctly in "Choose codepage" dialog.
Multi-screen engine doesn't handle correctly some cases.
Example:
1. Run mc.
2. Open some file in internal editor.
3. Switch back to the file panels.
4. Open another file in internal editor. As a result, two editors are opened.
5. Close current editor. Now you are in file panels.
6. Run screen list dialog (Meta-`).
6a. The 1st editor is highlighted as current screen. This is wrong.
Current screen is file panels.
6b. Cannot switch to the opened editor in this dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Save bookmarks of internal edit in filepos
Signed-off-by: Filip Sefrna <fsefrna@gmail.com>
Type accuracy.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Factored out error checking from ftpfs_initconn into
ftpfs_init_data_socket and fixed the logic of the initialization of DATA
connection. Now initialization of passive connection is retried if
needed after the failure to open the socket.
Got rid of goto statements and divided the code in two parts (passive &
active). Initial state is now properly restored after the function runs.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Miscellaneous refactoring:
* Factored out the active IPV4/IPV6 FTP connection mode setup
routine in a separate function (ftpfs_setup_active) to make the
logic more clear.
* Factored out ftpfs_init_data_socket from ftpfs_initconn in order
to make it possible to fix the logic later on.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
In current implementation few issues were fixed making passive
connection scheme more reliable:
* If it's IPV4, try PASV first, as some servers and ALGs get
confused by EPSV, and only then EPSV as a fallback
* When trying PASV or EPSV, actually try to connect to the provided
port and if the connection fails, still try the next method
* PASV and EPSV response parsing code was factored out in separate
routines for clarity
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
* Fixed endianness issue introduced by IPV6 patch, which prevented
active connections to be established via PORT mechanism.
FTP server always expects to see the port broken down into bytes
in network byte order, so the transformation to host byte order is
only needed when using EPRT.
* Some IPV4 FTP servers and FTP ALGs / NATs with connection tracking
become confused when you try to use EPSV or EPRT instead of PASV or
PORT respectively.
This commit changes current FTP connection scheme: if we deal with
an IPV4 host, instead of first trying to use EPRT, first try to
use PORT and only if it fails try EPRT as a fallback.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
On some FreeBSD servers with tcsh shell the following bug occurs
sometimes: trying to exit from mc it hangs. More detail:
1. run mc, press F10, press Enter - hangs
2. run mc, press F10, choose Command->File->Exit - NOT hangs.
This hang up is a result of subshell_chdir() call after subshell
close (after exit_subshell() call). When the F10 key is handled in
dlg_try_hotkey() function, the do_select_widget() is called. As a
result, the WIDGET_FOCUS message is sent to the active panel and panel
calls subshell_chdir(). But subshell is already closed at this
moment and midnight_dlg is in DLG_CLOSED state.
The solution: don't send DLG_DRAW, DLG_FOCUS and DLG_UNFOCUS messages to
the inactive dialog (that is not in DLG_ACTIVE state). Since dialog is
about destroying (in DLG_CLOSED state) or not visible in screen (in
DLG_SUSPENDED state) it is not needed in any visual changes.
Thanks Tempread for investigation of the problem root.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* fixed include? keyword
* fixed $ in the end of regexps
Valid highlighting of regexps can't be done with syntaxcolor.
Ruby uses '/' to divide numbers and for defining regexps.
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
Two common line jump protocols supported by mc are:
* mcedit +lineno file
* mcedit file:lineno
Unfortunately, in the implementation of the first protocol, if line
number equals to zero, which is often used to position the cursor at the
beginning of the file, it is completely ignored and file "+0" is opened
instead.
This patch fixes aforementioned issue.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>