[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs qe.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs qe.c |
Date: |
Fri, 27 Dec 2013 02:04:21 +0000 |
CVSROOT: /sources/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 13/12/27 02:04:21
Modified files:
. : qe.c
Log message:
support +line_num cmdline syntax in front of filenames
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.105&r2=1.106
Patches:
Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -b -r1.105 -r1.106
--- qe.c 27 Dec 2013 01:54:12 -0000 1.105
+++ qe.c 27 Dec 2013 02:04:21 -0000 1.106
@@ -7831,8 +7831,15 @@
/* load file(s) */
for (i = _optind; i < argc; i++) {
+ int line_num = 0;
+
+ if (argv[i][0] == '+' && i + 1 < argc) {
+ /* Handle +linenumber before file */
+ line_num = atoi(argv[i++]);
+ }
do_find_file(s, argv[i]);
- /* CG: handle +linenumber */
+ if (line_num)
+ do_goto_line(qs->active_window, line_num);
}
#if !defined(CONFIG_TINY) && !defined(CONFIG_WIN32)