[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs shell.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs shell.c |
Date: |
Sat, 25 Feb 2017 14:37:19 -0500 (EST) |
CVSROOT: /sources/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 17/02/25 14:37:18
Modified files:
. : shell.c
Log message:
shell: fix column number parsing for next-error
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/shell.c?cvsroot=qemacs&r1=1.115&r2=1.116
Patches:
Index: shell.c
===================================================================
RCS file: /sources/qemacs/qemacs/shell.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -b -r1.115 -r1.116
--- shell.c 1 Jan 2017 15:40:46 -0000 1.115
+++ shell.c 25 Feb 2017 19:37:18 -0000 1.116
@@ -91,6 +91,7 @@
static char error_buffer[MAX_BUFFERNAME_SIZE];
static int error_offset = -1;
static int error_line_num = -1;
+static int error_col_num = -1;
static char error_filename[MAX_FILENAME_SIZE];
static char *shell_get_curpath(EditBuffer *b, int offset,
@@ -100,7 +101,7 @@
{
pstrcpy(error_buffer, sizeof(error_buffer), b ? b->name : "");
error_offset = offset - 1;
- error_line_num = -1;
+ error_line_num = error_col_num = -1;
*error_filename = '\0';
}
@@ -2196,7 +2197,9 @@
goto next_line;
line_num = line_num * 10 + c - '0';
}
- if (c == ',') {
+ if (c == ',' || c == ':') {
+ int offset0 = offset;
+ int c0 = c;
for (;;) {
c = eb_nextc(b, offset, &offset);
if (c == ' ') continue;
@@ -2204,6 +2207,10 @@
break;
col_num = col_num * 10 + c - '0';
}
+ if (col_num == 0) {
+ offset = offset0;
+ c = c0;
+ }
}
while (c != ':') {
if (c == '\n')
@@ -2214,8 +2221,10 @@
error_message[len] = '\0'; /* strip the trailing newline if any */
if (line_num >= 1) {
if (line_num != error_line_num
+ || col_num != error_col_num
|| !strequal(fullpath, error_filename)) {
error_line_num = line_num;
+ error_col_num = col_num;
pstrcpy(error_filename, sizeof(error_filename), fullpath);
break;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemacs-commit] qemacs shell.c,
Charlie Gordon <=