[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6407] better highlighting of xrefs split across lines
From: |
Gavin D. Smith |
Subject: |
[6407] better highlighting of xrefs split across lines |
Date: |
Sat, 11 Jul 2015 00:37:09 +0000 |
Revision: 6407
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6407
Author: gavin
Date: 2015-07-11 00:37:08 +0000 (Sat, 11 Jul 2015)
Log Message:
-----------
better highlighting of xrefs split across lines
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/display.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-07-11 00:21:39 UTC (rev 6406)
+++ trunk/ChangeLog 2015-07-11 00:37:08 UTC (rev 6407)
@@ -1,3 +1,8 @@
+2015-07-11 Gavin Smith <address@hidden>
+
+ * info/display.c (display_update_window_1): Better handling of
+ cross-references split across across lines.
+
2015-07-10 Gavin Smith <address@hidden>
* info/display.c (display_update_window_1) <xref-rendition=1>:
Modified: trunk/info/display.c
===================================================================
--- trunk/info/display.c 2015-07-11 00:21:39 UTC (rev 6406)
+++ trunk/info/display.c 2015-07-11 00:37:08 UTC (rev 6407)
@@ -362,12 +362,9 @@
terminal_begin_underline ();
ref_seen_in_line = 1;
terminal_goto_xy (0, win->first_row);
- if (point_in_line)
- {
- point_in_line = 0;
- terminal_begin_standout ();
- ref_highlighted = 1;
- }
+ point_in_line = 0; /* Don't try to highlight a later reference. */
+ terminal_begin_standout ();
+ ref_highlighted = 1;
}
for (mbi_init (iter, start, win->node->contents + win->node->nodelen -
@@ -400,7 +397,10 @@
ref_leading_whitespace = 0;
terminal_begin_underline ();
if (ref_highlighted)
- terminal_begin_standout ();
+ {
+ terminal_begin_standout ();
+ point_in_line = 0;
+ }
}
if (matches && match_index != win->match_count)
@@ -469,15 +469,21 @@
/* Highlight the first reference in the line after the
cursor. This is a stronger condition than the code
in info_follow_reference_this_line, which can follow
- a reference before the cursor if none appears after it.
- Additionally, we fail to highlight a reference if it is
- split across lines and the cursor isn't on the first line. */
+ a reference before the cursor if none appears after it. */
if (point_in_line && win->point < refs[ref_index]->end)
{
point_in_line = 0;
terminal_begin_standout ();
ref_highlighted = 1;
}
+ else if (win->point >= refs[ref_index]->start
+ && win->point < refs[ref_index]->end)
+ {
+ /* This will be the case if the point is in a
+ cross-reference, but not in the current line. */
+ terminal_begin_standout ();
+ ref_highlighted = 1;
+ }
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6407] better highlighting of xrefs split across lines,
Gavin D. Smith <=