]> Sergey Matveev's repositories - nnn.git/commit
Fix #36: uneven splitting of codepoints
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 1 Sep 2017 04:52:44 +0000 (10:22 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 1 Sep 2017 04:52:44 +0000 (10:22 +0530)
commit1e5a0b8c5bc78462956d01c647293a7da594c36f
treed7b21e3c052d5a921723160264e41a8a40377427
parent2e33c577b15dc3ac2d2df793b76a1607be8ae66d
Fix #36: uneven splitting of codepoints

Check if the number of columns needed to print name exceeds the number of cols.
If it does, split the name str at the max number of columns available for name.
Conversion to wide char ensures the split is done at a valid codepoint.

The current patch adds some optimization as well:

- No more copying to an intermediate (global) string.
- If the name is shortened, escape chars are replaced only till the terminator.
nnn.c