Thread View: news.software.readers
2 messages
2 total messages
Started by Tanguy Ortolo
Mon, 16 Oct 2017 10:14
[Tin] Cannot paste a Message-Id to search
Author: Tanguy Ortolo
Date: Mon, 16 Oct 2017 10:14
Date: Mon, 16 Oct 2017 10:14
13 lines
1538 bytes
1538 bytes
Hello, I have a strange issue with Tin, which I use with an rxvt-unicode or xterm terminal, over an SSH connection. When I try to search a message by its Message-Id and middle-click to paste it, only one letter out of 6 appears. For instance, if I paste β1ndy2wl.1kdqamfgbx0vvN%contact@meta-science.frβ, only β1la0o@seβ appears, and of course, the search fails. Have you already seen such an issue? -- Tanguy
Re: [Tin] Cannot paste a Message-Id to search
Author: Urs JanΓen
Date: Sat, 21 Oct 2017 11:50
Date: Sat, 21 Oct 2017 11:50
34 lines
1809 bytes
1809 bytes
In <os20p9$kru$1@herbert.ortolo.eu>, Tanguy Ortolo wrote:
> Have you already seen such an issue?
the following patch fixes the issue
=== modified file 'src/tcurses.c'
@@ -583,13 +583,16 @@
if (wch < KEY_MIN) {
/* read in the multibyte sequence */
- char *mbs = my_malloc(MB_CUR_MAX + 1);
+ char *mbs = my_calloc(1, MB_CUR_MAX + 1);
int i, ch;
wchar_t wc;
mbs[0] = (char) wch;
nodelay(stdscr, TRUE);
- for (i = 1; i < (int) MB_CUR_MAX; i++) {
+ res = mbtowc(&wc, mbs, MB_CUR_MAX);
+ for (i = 1; i < (int) MB_CUR_MAX && res == -1; i++) {
+ if ((res = mbtowc(&wc, mbs, MB_CUR_MAX)) > 0)
+ break;
if ((ch = getch()) != ERR)
mbs[i] = (char) ch;
else
@@ -597,8 +600,6 @@
}
nodelay(stdscr, FALSE);
- mbs[i] = '\0';
- res = mbtowc(&wc, mbs, MB_CUR_MAX);
free(mbs);
if (res == -1)
return WEOF; /* error */
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads