#7955 closed bug (fixed)
[BTextView] can't set cursor to the end of this file
Reported by: | diver | Owned by: | leavengood |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Kits/Interface Kit | Version: | R1/Development |
Keywords: | Cc: | x-otic@… | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
I can't move cursor to the end of the line in this file using StyledEdit.
Attachments (2)
Change History (8)
by , 13 years ago
Attachment: | unreachable_end_of_line.txt added |
---|
comment:1 by , 12 years ago
patch: | 0 → 1 |
---|
comment:2 by , 12 years ago
Cc: | added |
---|---|
Component: | Applications/StyledEdit → Kits/Interface Kit |
Owner: | changed from | to
Summary: | [StyledEdit] can't set cursor to the end of this file → [BTextView] can't set cursor to the end of this file |
by , 12 years ago
Attachment: | CorrectTabWidth.patch added |
---|
Correction of tab width calculation in BTextView.
follow-up: 4 comment:3 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
I'll test this patch and try to commit it this week. Taking ownership.
comment:4 by , 12 years ago
Replying to leavengood:
I'll test this patch and try to commit it this week. Taking ownership.
Thanks a lot!
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | in-progress → closed |
Thanks for the patch, I applied it in hrev44500 (woohoo, nice even number.)
Just a note for the future: when doing git commit messages it is generally preferred to have the first line 50 characters or less, then a blank line and more detail, wrapped at 72 characters. As you may notice in the above I fixed your commit message to be like that. Here is a blog post with more detail and the reasoning:
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
Also you had a line with extra whitespace in your patch, which we like to avoid. I fixed it though.
In fact this appears to be a BTextView issue. In rare cases such as described above BTextView happens to calculate the width of a tab close to zero (e.g. 0.000031). This patch adds a fallback to the default tab width in that case. Fixes #7955.
This bug is visible under really seldom conditions. I could reproduce it with that exact string and with the default font (DejaVu Sans Book) only. Other fonts used with that string did not reveal this behaviour. However, it can be reproduced by pasting that text into the navigator editbox of Tracker, which indicated that it is an Interface Kit issue.