aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2010-06-22 08:49:12 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2010-06-22 08:49:12 +0000
commit591ef8ab4aa05f2d063c4f9e185d7fd955235bb8 (patch)
tree2e2d320cb868cbc924e91239d35f202968d777d3 /gtk
parent19bd423fe958b72b5448d96aed7eb9fdb3ad84a5 (diff)
Highlight correct number of bytes when highlighted hex dump ends at the end
of the first block. svn path=/trunk/; revision=33283
Diffstat (limited to 'gtk')
-rw-r--r--gtk/main_proto_draw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/main_proto_draw.c b/gtk/main_proto_draw.c
index 4c9b30b337..454d890365 100644
--- a/gtk/main_proto_draw.c
+++ b/gtk/main_proto_draw.c
@@ -1158,12 +1158,12 @@ packet_hex_apply_reverse_tag(GtkTextBuffer *buf, int bstart, int bend, guint32 m
/* bits/hex */
gtk_text_buffer_get_iter_at_line_index(buf, &i_start, start_line, hex_fix(start_line_pos));
- gtk_text_buffer_get_iter_at_line_index(buf, &i_stop, start_line, hex_fix(line_pos_end)-1);
+ gtk_text_buffer_get_iter_at_line_index(buf, &i_stop, start_line, hex_fix(line_pos_end)-1-(line_pos_end == per_line/2));
gtk_text_buffer_apply_tag(buf, revstyle_tag, &i_start, &i_stop);
/* ascii */
gtk_text_buffer_get_iter_at_line_index(buf, &i_start, start_line, ascii_fix(start_line_pos));
- gtk_text_buffer_get_iter_at_line_index(buf, &i_stop, start_line, ascii_fix(line_pos_end));
+ gtk_text_buffer_get_iter_at_line_index(buf, &i_stop, start_line, ascii_fix(line_pos_end)-(line_pos_end == per_line/2));
gtk_text_buffer_apply_tag(buf, revstyle_tag, &i_start, &i_stop);
start_line_pos = 0;