[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] fixing the tickle (was: Smooth Horizontal Scroll patch)
From: |
Benno Schulenberg |
Subject: |
Re: [Nano-devel] fixing the tickle (was: Smooth Horizontal Scroll patch) |
Date: |
Tue, 20 May 2014 10:41:53 +0200 |
Hello Mark,
On Tue, May 20, 2014, at 0:35, Mark Majeres wrote:
> I was looking at the undo/redo problem that remains with --enable-utf8
It would be nice to have that, yes, but it's not worth holding up the
release for it, in my opinion. The current improvements are enough of a
step forward to merit a release, and get some wider testing. And there
will be a 2.3.4 in a month or two.
> I noticed several lines of code with sizeof(char*). Someone may want
> to look at these and change them to sizeof(char). Not sure if this
> will fix any bugs (or maybe cause some), but sizeof a pointer doesn't
> seem right.
Hmm... The thing is, characters in UTF-8 can take up to 4 bytes, so in
many cases sizeof(char *) will indicate the correct amount. But that is
by coincidence. I think it should be replaced in several cases by a new
constant, say MAX_BYTES_PER_CHAR, which should be defined as 4 when UTF-8
is enabled, and maybe as 1 or 2 otherwise.
Of the five sizeof(char*) in text.c the four for the speller and the
linter seem correct to me, the execvp() call wants pointers. The other
one, the two in browser.c and the three in files.c need replacement by
MAX_BYTES_PER_CHAR, I think. And maybe some of the sizeof(char) need
replacement too, because they falsely assume ASCII.
Benno
--
http://www.fastmail.fm - The way an email service should be
- [Nano-devel] Smooth Horizontal Scroll patch, Mark Majeres, 2014/05/15
- Re: [Nano-devel] Smooth Horizontal Scroll patch, Benno Schulenberg, 2014/05/15
- Re: [Nano-devel] Smooth Horizontal Scroll patch, Mark Majeres, 2014/05/18
- Re: [Nano-devel] Smooth Horizontal Scroll patch, Benno Schulenberg, 2014/05/18
- Re: [Nano-devel] Smooth Horizontal Scroll patch, Mark Majeres, 2014/05/19
- Re: [Nano-devel] fixing the tickle (was: Smooth Horizontal Scroll patch), Benno Schulenberg, 2014/05/19
- Re: [Nano-devel] fixing the tickle (was: Smooth Horizontal Scroll patch), Mark Majeres, 2014/05/19
- Re: [Nano-devel] fixing the tickle (was: Smooth Horizontal Scroll patch),
Benno Schulenberg <=
- Re: [Nano-devel] fixing the tickle (was: Smooth Horizontal Scroll patch), Mark Majeres, 2014/05/20
- Re: [Nano-devel] Smooth Horizontal Scroll patch, Mark Majeres, 2014/05/21
- Re: [Nano-devel] Smooth Horizontal Scroll patch (failing to update screen after where-is-next), Benno Schulenberg, 2014/05/21
- Re: [Nano-devel] Smooth Horizontal Scroll patch (failing to update screen after where-is-next), Mark Majeres, 2014/05/22
- Re: [Nano-devel] Smooth Horizontal Scroll patch (failing to update screen after where-is-next), Benno Schulenberg, 2014/05/22