Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disappear some words when I types more than two Chinese words in '', just 2.4, not 2.3. #873

Closed
getong opened this issue Apr 22, 2017 · 7 comments

Comments

@getong
Copy link

getong commented Apr 22, 2017

tmux_2 4_disappear_words

I compile tmux 2.4 myself. Today I type more than two Chinese words in the tmux version 2.4. It disappears some words in the terminal. See the pic above.

I also test it in 2.3 version, it works fine and not found this bug.

@nicm
Copy link
Member

nicm commented Apr 22, 2017

Logs please.

@getong
Copy link
Author

getong commented Apr 22, 2017

@nicm It does not crash, and works fine. Even the words disappears in the terminal, the words still works as I get it back from the other softwares. And I don't know how to get the log.

@nicm
Copy link
Member

nicm commented Apr 22, 2017

Please read the CONTRIBUTING file.

@getong
Copy link
Author

getong commented Apr 22, 2017

tmux-server-3788.log.txt

@nicm
Copy link
Member

nicm commented Apr 22, 2017

I think this is the fix, we need to treat UTF-8 characters like normal characters. Please try to make this change:

Index: input.c
===================================================================
RCS file: /cvs/src/usr.bin/tmux/input.c,v
retrieving revision 1.118
diff -u -p -r1.118 input.c
--- input.c	22 Mar 2017 07:16:54 -0000	1.118
+++ input.c	22 Apr 2017 07:59:41 -0000
@@ -2011,7 +2011,7 @@ input_utf8_close(struct input_ctx *ictx)
 	    (int)ud->size, ud->data, ud->width);
 
 	utf8_copy(&ictx->cell.cell.data, ud);
-	screen_write_cell(&ictx->ctx, &ictx->cell.cell);
+	screen_write_collect_add(&ictx->ctx, &ictx->cell.cell);
 
 	return (0);
 }

@getong
Copy link
Author

getong commented Apr 22, 2017

@nicm I replace the patch, it works fine. Thanks.

@getong getong closed this as completed Apr 22, 2017
@lock
Copy link

lock bot commented Feb 16, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants