Closed
Bug 543999
Opened 16 years ago
Closed 15 years ago
Support for real tabs
Categories
(Skywriter Graveyard :: Editor, defect, P1)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: dangoor, Unassigned)
Details
Attachments
(3 files)
|
10.55 KB,
image/jpeg
|
Details | |
|
2.92 KB,
image/png
|
Details | |
|
21.39 KB,
patch
|
Details | Diff | Splinter Review |
The rewritten editor doesn't properly support the tab character.
| Reporter | ||
Comment 1•16 years ago
|
||
Bumping to 0.7.1. Not critical for the first round.
Target Milestone: 0.7.0 → 0.7.1
| Reporter | ||
Updated•16 years ago
|
Target Milestone: 0.7.1 → ---
Comment 2•16 years ago
|
||
Did this end up making the cut for 0.7.1? as that has now been released :-)
| Reporter | ||
Comment 3•16 years ago
|
||
Nope... I cleared the milestone once I saw that there was no way it was going to get into 0.7.1... I definitely know that people want this, though!
Updated•16 years ago
|
Assignee: nobody → gphemsley
Comment 4•16 years ago
|
||
I've assigned this to me, as I'll be working on this, under Julian's supervision.
I've currently implemented very basic support for real tabs. It creates a new 'tabmode' boolean setting (defaults to false, meaning off) that allows the use of real tab characters. The underlying textstorage mechanism recognizes and remembers the characters as true tab characters (meaning they're copy-and-pasteable), but currently only the line/character painting recognizes that they're multi-width characters. More specifically, that means that the cursor continues to treat a tab as if it has the width of one character, which means cursor placement will be wrong on any line that has a tab in it.
I've put the code I've got so far up on BitBucket, and I'll be working on this bug on the 'realtabs' branch:
http://bitbucket.org/gphemsley/bespinclient/changeset/7b4f334abcf8/
Comment 5•16 years ago
|
||
One note so far: I think the way you treat the tabs in the _drawLines function is leading in the wrong direction. The _expandTabs() function converts the entire text line into a line that has the tabs expanded. That is okay if you just want to paint the text with tabs, but this way the position used within the syntax manager does not fit anymore, which means you have to convert the syntax position from the "model" position to the "display" position - I think we both agreed yesterday that this is not the best way to do it. (I will attach a screen shot that might help you understand what I mean.)
Instead of expanding the entire line before painting, the text up to a tab should get painted normal, only the tab should get painted different (more spaces etc.) and then the normal text should get painted again like normal.
For the cursor-positioning-problem: After you updated the functions in the LayoutManager to deal with real-tabs, this issue should go away automatically. Here's the gist again with the necessary functions: http://gist.github.com/362234
If you think I'm telling grab, shout at me ;)
Comment 6•16 years ago
|
||
Comment 7•16 years ago
|
||
After discussion via IRC and such, I've gotten the code to a point where it's much closer to where we want it to be.
There's still a lot to be done, I think, and it's not yet ready to be pulled into the main tree, but it's certainly testable now.
Here are the two changesets with the updated code:
https://bitbucket.org/gphemsley/bespinclient/changeset/c7b219d0ef23 (very messy)
https://bitbucket.org/gphemsley/bespinclient/changeset/a5b590774d25 (cleans up most of the mess and makes things work properly)
Comment 8•16 years ago
|
||
Comment 9•16 years ago
|
||
I've just run a short test on your codebase. I noticed the following things:
a) as you can see in attachment #2 [details] [diff] [review], the unfocused cursor is painted to width (in this situation it should be only 1 character). This indicates, that something in the layoutManager.characterRectForPosition() function is wrong.
b) If I click the mouse on the "h" in the screenshot and move the cursor over the "e", the selection is "hello wolr". Indicates that something is wrong in the layoutmanager.characterAtPoint() function.
c) If I move the cursor before the "o" in "hello", the string "wolrd" disappears.
I hope you find this input helpful.
Comment 10•16 years ago
|
||
For those who are following along, I've had multiple off-Bugzilla conversations with Julian about one thing or another regard my progress on this bug. I've made a number of commits and probably half of them have undone previous ones.
So, this is a patch from the changeset that I branched from: changeset c620a84cb645. I want to try to get the latest code from the current tip, post-SproutCore, so I'm attaching this for safe-keeping.
Comment 11•16 years ago
|
||
Gordon,
thanks for you're work! I don't expect that converting your code to the new SC-free codebase should be a complicated thing - mostly just the get and set functions are gone. If you need assistance, feel free to ping me.
Julian
Updated•16 years ago
|
Assignee: gphemsley → jviereck
| Reporter | ||
Updated•16 years ago
|
Assignee: julian.viereck → nobody
| Reporter | ||
Comment 12•15 years ago
|
||
ACETRANSITION
The Skywriter project has merged with Ajax.org's Ace project (the full server part of which is their Cloud9 IDE project). Background on the change is here:
http://mozillalabs.com/skywriter/2011/01/18/mozilla-skywriter-has-been-merged-into-ace/
The bugs in the Skywriter product are not necessarily relevant for Ace and quite a bit of code has changed. For that reason, I'm closing all of these bugs. Problems that you have with Ace should be filed in the Ace issue tracker at GitHub:
https://github.com/ajaxorg/ace/issues
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•