Re: [PATCH] better UTF-8 support for buffer_sample

2014-03-08 Thread Kosuke ASAMI
I have tested, and it works fine! However, there is a mistake in my first patch. The flag needs to be cleared before next iteration. (like following diff) I have attached the complete patch. -- diff --git a/utf8.c b/utf8.c index 10200dd..0465a32 100644 --- a/utf8.c +++ b/utf8.c @@ -379,

Re: patch for get_cwd for cygwin

2014-03-08 Thread Nicholas Marriott
no but i told him to just hack configure.ac to build osdep-linux.c. anyway if it works for you that's fine On Sat, Mar 08, 2014 at 12:29:24PM -0600, J Raynor wrote: > > nice, i thought they would probably be very similar but the guy who > > requested this said he tried to copy osdep-linux.c and i

Re: patch for get_cwd for cygwin

2014-03-08 Thread J Raynor
> nice, i thought they would probably be very similar but the guy who > requested this said he tried to copy osdep-linux.c and it didn't work Hmm. Did he supply a patch? I'm just wondering if he forgot to update configure.ac. In that case, tmux would've continued to use osdep-unknown.c. --

Re: patch for append to buffer

2014-03-08 Thread J Raynor
> what i didn't like before was that setb -a w/o any buffers acts like > setb, but i think that is actually more useful than an error In copy mode, if you highlight some text and hit 'A', it'll set buffer 0 if it's NULL, otherwise it'll append to what's there. I figured "setb -a" should work the

Re: [PATCH] better UTF-8 support for buffer_sample

2014-03-08 Thread Nicholas Marriott
Hi Here's it with a little tidying up. I didn't test this but can you take a look? diff --git a/cmd-choose-buffer.c b/cmd-choose-buffer.c index d79f6fd..a46db3e 100644 --- a/cmd-choose-buffer.c +++ b/cmd-choose-buffer.c @@ -45,6 +45,7 @@ cmd_choose_buffer_exec(struct cmd *self, struct cmd_q *cmd

Re: [Patch] Lookup width of UTF-8 character is wrong

2014-03-08 Thread Nicholas Marriott
Yes, you are right... oops. Fix applied thanks. On Sat, Mar 08, 2014 at 10:14:19PM +0900, Koga Osamu wrote: > Hello, > > I found a bug in lookup width of UTF-8 data which consists of 4 bytes. > > The problem is in utf8_combine. > In there the Unicode codepoint is reconstructed from UTF-8 sequen

[Patch] Lookup width of UTF-8 character is wrong

2014-03-08 Thread Koga Osamu
Hello, I found a bug in lookup width of UTF-8 data which consists of 4 bytes. The problem is in utf8_combine. In there the Unicode codepoint is reconstructed from UTF-8 sequence but the first byte is treated incorrectly. According to UTF-8 structure, only last 3 bits of the first byte of the 4-by

Re: [PATCH] better UTF-8 support for buffer_sample

2014-03-08 Thread Kosuke ASAMI
> Arguments the wrong way round? Sorry, I have fixed it. I have moved the method from compat/vis.c to utf8.c and renamed it. 2014-03-08 18:25 GMT+09:00 Nicholas Marriott : > Hi > > vis.c is only built on some platforms so the new function would be > better in utf8.c as something like utf8_strvi

Re: [PATCH] better UTF-8 support for buffer_sample

2014-03-08 Thread Nicholas Marriott
Hi vis.c is only built on some platforms so the new function would be better in utf8.c as something like utf8_strvis. Also this looks wrong: - format_paste_buffer(ft, pb); + format_paste_buffer(wp, ft, pb); Arguments the wrong way round? On Sat, Mar 08, 2014 at 06:

[PATCH] better UTF-8 support for buffer_sample

2014-03-08 Thread Kosuke ASAMI
I have implemented a better UTF-8 support for buffer_sample in choose-buffer and list-buffers. When an user enables UTF-8 on window option, choose-buffer and list-buffers show UTF-8 characters if so. Otherwise, they do as until now. utf8_buffers.patch Description: Binary data ---

Re: use "--" to mark start of command w/ neww etc to avoid quoting

2014-03-08 Thread Nicholas Marriott
Hi Sorry for the delay in looking at this. Any chance you can split the PATH bits out so they work on the current code then we can apply them separately before adding --? On Thu, Feb 13, 2014 at 11:15:27PM -0600, J Raynor wrote: > > I reckon we always set PATH and yes pass it into the func. Be

Re: patch for append to buffer

2014-03-08 Thread Nicholas Marriott
what i didn't like before was that setb -a w/o any buffers acts like setb, but i think that is actually more useful than an error On Thu, Mar 06, 2014 at 06:29:03PM -0600, J Raynor wrote: > > Applied with a few changes, thanks > > The changes removed a bit of functionality. If someone does "set

Re: patch for get_cwd for cygwin

2014-03-08 Thread Nicholas Marriott
nice, i thought they would probably be very similar but the guy who requested this said he tried to copy osdep-linux.c and it didn't work On Fri, Mar 07, 2014 at 11:05:27PM -0600, J Raynor wrote: > The TODO list has this item: > > * get_cwd for cgywin > > > I've attached a patch which impleme