1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

Fix problem when irssi display a lone line at bottom line of display area.

PR:		ports/34305
Submitted by:	mhsin@mhsin.org
This commit is contained in:
Vanilla I. Shu 2002-01-27 04:57:13 +00:00
parent b8bc10a4e1
commit d52e203407
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=53823
2 changed files with 17 additions and 9 deletions

View File

@ -10,9 +10,9 @@ EXTRA_PATCHES= ${.CURDIR}/files/patch-config.h.in \
${.CURDIR}/files/patch-configure.in \
${.CURDIR}/files/patch-src_fe-text_gui-entry.c \
${.CURDIR}/files/patch-src_fe-text_screen.h \
${.CURDIR}/files/patch-src_fe-text_wrap.c
${.CURDIR}/files/patch-src_fe-text_window.c
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= chinese
MAINTAINER= vanilla@FreeBSD.org

View File

@ -1,5 +1,5 @@
--- src/fe-text/gui-windows.c.orig Mon Oct 29 20:51:52 2001
+++ src/fe-text/gui-windows.c Tue Oct 30 01:48:09 2001
--- src/fe-text/gui-windows.c.orig Sat Mar 17 07:55:50 2001
+++ src/fe-text/gui-windows.c Sat Jan 26 19:40:34 2002
@@ -289,6 +289,7 @@
unsigned char cmd;
char *ptr, *last_space_ptr;
@ -25,7 +25,7 @@
xpos = indent_pos;
sub = g_new(LINE_CACHE_SUB_REC, 1);
@@ -376,8 +377,27 @@
@@ -376,8 +377,25 @@
continue;
}
@ -45,13 +45,21 @@
+ }
+ if(xpos <= COLS)
+ ptr += w;
+ else
+ ptr ++;
+
+ if(w == 1 && xpos <= COLS &&
+ ptr[0] != '\0' && ptr[1] != '\0' &&
+ is_big5(ptr[0], ptr[1]))
+ (ptr[0] == ' ' ||
+ (ptr[0] != '\0' && ptr[1] != '\0' && is_big5(ptr[0], ptr[1]))))
+ {
last_space = xpos-1;
last_space_ptr = ptr;
last_color = color;
@@ -525,6 +543,9 @@
next_pos = (n+1 < cache->count) ?
cache->lines[n].start : NULL;
+ if(next_pos != NULL && next_pos > pos && *(next_pos - 1) == ' ')
+ while(next_pos > pos && *(next_pos - 1) == ' ')
+ next_pos --;
single_line_draw(gui, ypos, sub, pos, next_pos);
}