mc/mc-4.8.4-remember_file_position.patch

54 lines
1.7 KiB
Diff
Raw Permalink Normal View History

Index: src/args.c
===================================================================
--- src/args.c (revision 23c95d36ac4465627fbc9183e083a8320df77fcf)
+++ src/args.c (revision e39c697df47fe1beb727e0cb890a4c27c22cef09)
@@ -546,5 +546,5 @@
else
{
- arg = mcedit_arg_vpath_new (tmp_vpath, 1);
+ arg = mcedit_arg_vpath_new (tmp_vpath, 0);
vfs_path_free (fname_vpath);
}
@@ -553,5 +553,5 @@
}
else
- arg = mcedit_arg_new (tmp, 1);
+ arg = mcedit_arg_new (tmp, 0);
flist = g_list_prepend (flist, arg);
@@ -559,12 +559,9 @@
if (flist == NULL)
- flist = g_list_prepend (flist, mcedit_arg_new (NULL, 1));
+ flist = g_list_prepend (flist, mcedit_arg_new (NULL, 0));
else if (first_line_number != -1)
{
/* overwrite line number for first file */
GList *l;
-
- if (first_line_number == 0)
- first_line_number = 1;
l = g_list_last (flist);
@@ -820,5 +817,5 @@
*
* @param file_name file name
- * @param line_number line number
+ * @param line_number line number. If value is 0, try to restore saved position.
* @return mcedit_arg_t object
*/
@@ -835,5 +832,5 @@
*
* @param file_vpath file path object
- * @param line_number line number
+ * @param line_number line number. If value is 0, try to restore saved position.
* @return mcedit_arg_t object
*/
@@ -846,6 +843,4 @@
arg = g_new (mcedit_arg_t, 1);
arg->file_vpath = file_vpath;
- if (line_number == 0)
- line_number = 1;
arg->line_number = line_number;