Commit graph

194 commits

Author SHA1 Message Date
Mohit Rathore 8845d1a7c3 early codepoint breaking 2017-08-30 00:14:00 +05:30
Mohit Rathore 49ae9b655a experimenting with mblen 2017-08-29 00:18:34 +05:30
Arun Prakash Jana c49b79d792
Fix cursor position issue with astral symbols
In case of astral symbols like Devanagari matras multiple wide-char codepoints
occupy a single position/column. Positioning the cursor wrt. the actual number
of wide-characters in a wide-char string gets "visually incorrect".  The trick
is to calculate the correct number of columns needed to represent a fixed-size
wide-character string.

Relevant man pages:

1. wcswidth(3)
2. wctomb(3)
3. mblen(3)

Interesting links:

1. https://www.gnu.org/software/libc/manual/html_node/Non_002dreentrant-Character-Conversion.html
2. https://www.gnu.org/software/libc/manual/html_node/Shift-State.html
3. https://10hash.com/c-programming/uchar/
4. https://mathiasbynens.be/notes/javascript-unicode#accounting-for-astral-symbols

Example file names for test:

1. Malgudi Days - मालगुडी डेज - E05. Swami and Friends - स्वामी और उसके दोस्त (Part 5)
2. Eso eso aamar ghare eso ♫ এসো এসো আমার ঘরে এসো ♫ Swagatalakshmi Dasgupta
3. Führer
2017-08-26 14:46:49 +05:30
Arun Prakash Jana ac03793547
A shorter overwrite message (key is not echoed) 2017-08-26 09:37:04 +05:30
Arun Prakash Jana 6b6182a61a Revert "Handle multi-byte: 2 codepoints single column"
This reverts commit e8cf0dc663.
2017-08-26 02:42:33 +05:30
Arun Prakash Jana e8cf0dc663
Handle multi-byte: 2 codepoints single column
Very frequent with Devanagari scripts ('matra's)
2017-08-26 02:35:01 +05:30
Arun Prakash Jana f94235333a
More concise help 2017-08-25 22:09:03 +05:30
Arun Prakash Jana 776d782fcf
Clear rename prompt with Ctrl-L 2017-08-25 21:49:55 +05:30
Arun Prakash Jana 4196af94f7
The '> ' as rename prompt is distracting 2017-08-25 19:22:30 +05:30
Arun Prakash Jana ccdb95f3ab
mbstowcs() returns the codepoints 2017-08-25 18:27:06 +05:30
Arun Prakash Jana b854f396cf Simplify filter handling 2017-08-25 14:13:26 +05:30
Arun Prakash Jana efc70f33e5
Get rid of getch() ('Führer' works now) 2017-08-25 13:57:22 +05:30
Arun Prakash Jana 76d582d5cd
Show line number only on fatal error 2017-08-24 22:26:46 +05:30
Arun Prakash Jana 512b7ac6cd
Re-order macros, globals... 2017-08-24 21:39:16 +05:30
Arun Prakash Jana f31978573e
Remove extern ref to wget_wch() 2017-08-24 19:43:11 +05:30
Arun Prakash Jana 05bb9db9e1
Remove extern ref to add_history() 2017-08-24 19:36:33 +05:30
Arun Prakash Jana 08b5fc8231
Fix build failure 2017-08-24 19:13:00 +05:30
Arun Prakash Jana 2f40eb5efc
Show volume capacity in help 2017-08-24 17:50:00 +05:30
Arun Prakash Jana 7275d68ab7
Rename MAX_BM to BM_MAX 2017-08-24 10:16:35 +05:30
Arun Prakash Jana 7c52e4a89e
Support multi-byte string in rename 2017-08-24 10:15:32 +05:30
Arun Prakash Jana f4b2e3a5df
Show filename in rename 2017-08-24 10:12:03 +05:30
Arun Prakash Jana e3bce10908
Add checks before dir access 2017-08-23 18:13:22 +05:30
Arun Prakash Jana f53f1b86e0
Remove shortcut F2 for refresh.
F2 is not very portable e.g., doesn't work over putty (default settings).
2017-08-23 17:36:32 +05:30
Arun Prakash Jana be337d883e
Disable dir watch in filter mode 2017-08-23 09:29:21 +05:30
Arun Prakash Jana fb521a7a94
Use hyphen within date 2017-08-23 01:17:09 +05:30
Arun Prakash Jana 0b3bec329f
Support in-place file rename 2017-08-23 00:51:59 +05:30
Arun Prakash Jana 5404cee9ee
Line length size limit is now 139 2017-08-22 22:34:17 +05:30
Arun Prakash Jana 081cb3a3e8
Do not follow mounted fs in du mode 2017-08-22 21:31:06 +05:30
Arun Prakash Jana 96e9028226 Implement BSD, Apple dir watch (#35) 2017-08-21 22:03:26 +05:30
Arun Prakash Jana e4596db30a
Watch out for directory changes 2017-08-21 20:55:56 +05:30
Arun Prakash Jana be77094235
Limit max open fds to 20K. 2017-08-21 09:16:11 +05:30
Arun Prakash Jana 1efa17cf23
A compact help format 2017-08-20 23:18:58 +05:30
Arun Prakash Jana 3d89b3f945
Support mark a directory
In certain workflows you know you would have revisit a directory. Mark it!
2017-08-20 16:47:23 +05:30
Arun Prakash Jana f178004b13
Show vol free in help 2017-08-12 19:57:23 +05:30
Arun Prakash Jana 7fe6abb213
Prepare for release v1.3 2017-07-26 09:31:03 +05:30
Arun Prakash Jana 16f0054b48
Fix #34: use ~75% of max open file descs 2017-07-25 10:13:22 +05:30
Arun Prakash Jana c9c5dfaef7
Remove tab 2017-07-09 07:41:44 +05:30
Arun Prakash Jana fb4263a736
Reset current on empty filter prompt 2017-07-08 11:02:17 +05:30
Arun Prakash Jana a8f7ee9deb
Option -n is redundant 2017-07-06 00:02:09 +05:30
Arun Prakash Jana 3f7a6c0b5d
Code refactoring 2017-07-05 23:46:10 +05:30
Arun Prakash Jana 7bb1e4e4bf
Use xmemrchr() instead of strrchr() 2017-07-05 10:17:42 +05:30
Arun Prakash Jana 7b6e3c261d
Change single-line 0-arg APIs to macros 2017-07-05 09:38:19 +05:30
Arun Prakash Jana 3c612fe64d
Update memory usage (latest release) 2017-07-05 08:20:40 +05:30
Arun Prakash Jana 342ecdc3ef
More concise help screen. 2017-07-04 10:01:50 +05:30
Arun Prakash Jana e585d830cd
More optimization 2017-07-03 20:41:58 +05:30
Arun Prakash Jana 76d600b072
Use the global buffer 2017-07-03 18:09:11 +05:30
Arun Prakash Jana be8e9d5213
Re-format help 2017-07-03 10:24:20 +05:30
Arun Prakash Jana be8e4d8552
Custom color support for directories 2017-07-03 02:26:47 +05:30
Arun Prakash Jana a7d88ad7f9
Repeat search: reset current selection 2017-07-03 01:49:14 +05:30
Arun Prakash Jana 093caecd82
Calculate word size inline 2017-07-03 00:55:47 +05:30