Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 174081 Details for
Bug 249624
app-misc/mc-4.6.2_pre1: problems with double-width chars
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
diff between Redhat patch and the one I'm using
dwidth-fix.patch (text/plain), 1.57 KB, created by
Rafał Mużyło
on 2008-12-02 16:49:15 UTC
(
hide
)
Description:
diff between Redhat patch and the one I'm using
Filename:
MIME Type:
Creator:
Rafał Mużyło
Created:
2008-12-02 16:49:15 UTC
Size:
1.57 KB
patch
obsolete
>--- mc-utf8.patch 2008-03-27 14:33:05.000000000 +0100 >+++ 20_all_mc-utf8.patch 2008-12-02 17:27:25.000000000 +0100 >@@ -437,7 +437,7 @@ diff -up mc-4.6.2-pre1/src/widget.c.utf8 > + l = mbrtowc(&wc, in->buffer + pos, len - pos, &mbs); > + if (l <= 0) > + return width; >-+ pos += l; width += wcwidth(wc); >++ pos += l; if (wcwidth(wc)>0 && in->is_password) {width++;} else width += wcwidth(wc); > + i++; > + }; > + return width; >@@ -487,7 +487,7 @@ diff -up mc-4.6.2-pre1/src/widget.c.utf8 > + for (i = 0, j = in->first_shown; (i < in->field_len - has_history) && (j < buf_len); i++,j++){ > + char * chp = in->buffer + charpos(in,j); > + size_t res = mbrtowc(&c, chp, strlen(chp), &mbs); >-+ c = (res && iswprint (c)) ? 0 : '.'; >++ if (res == 0) continue; c = (iswprint (c)) ? 0 : L'.'; > +#endif /* UTF8 */ > + if (in->is_password) > c = '*'; >@@ -1481,7 +1481,7 @@ diff -up mc-4.6.2-pre1/src/view.c.utf8 m > int c_prev; > int c_next; > >-@@ -1988,10 +2027,17 @@ view_display_text (WView * view) >+@@ -1988,10 +2027,21 @@ view_display_text (WView * view) > if (col >= view->dpy_text_column > && col - view->dpy_text_column < width) { > widget_move (view, top + row, left + (col - view->dpy_text_column)); >@@ -1495,6 +1495,10 @@ diff -up mc-4.6.2-pre1/src/view.c.utf8 m > + if (!iswprint (wc)) > + wc = '.'; > + tty_print_char (wc); >++ { >++ int cw = wcwidth(wc); >++ if (cw > 1) col+= cw - 1; >++ } > +#endif > } > col++; >@@ -5392,32 +5396,3 @@ diff -up mc-4.6.2-pre1/acinclude.m4.utf8 > > if test x$with_screen = xslang; then > AC_DEFINE(HAVE_SYSTEM_SLANG, 1,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 249624
: 174081