Ticket #2410 (closed defect: duplicate)

Opened 8 years ago

Last modified 2 years ago

Position calculation is byte-related not character-related

Reported by: gotar Owned by:
Priority: trivial Milestone:
Component: mcview Version: 4.7.4
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Movement functions are using constant widths of 1 byte ignoring character conversion (especially for UTF-8 encoding which shrinks 2 byte representation to display, but also tab character which expands 1 byte to 8 cells).
This results in some glitches in wrap mode on top line, when wrap point is missed (function takes view->data_area.width of bytes not characters, i.e. on a left side) or skipping an extra row if wrapping occours 'after' EOL (row expanded to the right by tab characters).

This is mostly harmless for files containing mostly 1-byte encoded characters, and resolving it would require either converting entire file to internal representation, or doing this in-place for every line moved. Anyway this would have negative impact on performance, so unless it affects users of non-latin alphabets (like russian or chinese) I'd suggest to close this ticket as wontfix and leave it just for the record.

This is easy to reproduce with UTF-8 encoded files on 8-bit terminal at least and with tabbed lines having $COLUMNS length on screen.

Change History

comment:1 Changed 7 years ago by andrew_b

  • Branch state set to no branch
  • Milestone changed from 4.7 to Future Releases

comment:2 Changed 7 years ago by andrew_b

  • Status changed from new to closed
  • Resolution set to duplicate

Duplicate of #2283.

comment:3 Changed 2 years ago by andrew_b

  • Milestone Future Releases deleted
Note: See TracTickets for help on using tickets.