Newly-inserted tabs get painted on all lines

VERIFIED FIXED in 0.2

Status

Skywriter
Editor
VERIFIED FIXED
9 years ago
9 years ago

People

(Reporter: GPHemsley, Assigned: Julian Viereck)

Tracking

Details

Attachments

(2 attachments)

(Reporter)

Description

9 years ago
With both tabarrow and showtabspace on, inserting a new tab causes that tab to be painted on all lines. (The model, however, is unaware of this phenomenon, and only stores the tab where you put it.)

I'm fairly certain this is related to the new syntax engine.
(Reporter)

Updated

9 years ago
Whiteboard: editor
(Reporter)

Comment 1

9 years ago
Based on some previous IRC discussions, it may be important to note that I'm running Firefox 3.1b3 with Firebug 1.4.0a14 installed.
(Assignee)

Comment 2

9 years ago
I cannot reproduce this bug.

The editor doesn't display any tabarrows or tabspaces until I added this patch: http://bitbucket.org/j4c/bespin/changeset/1cbedd504e40/

Tested with Safari 4Beta.

Comment 3

9 years ago
In tip and in editor.js, inside _paint function the lineMetadata is not available in the innerPaint() function, should be easy to fix, just adding that var to the args when calling the innerPaint function, will try and test this, unless it conflicts with Julians patch from comment #2
(Assignee)

Comment 4

9 years ago
Roberto,

> lineMetadata is not available in the innerPaint() function, should be easy to fix, just adding 
> that var to the args when calling the innerP...

that's what I've done with my patch. Could you solve that problem in a better way? When calling the syntaxengine the linetext is passed to it, which comes from the lineMetadata.lineText; So, couldn't the lineMetadata completly be applied to the syntaxengine, which takes the lineText for pharsing the syntax and gives the innerPaint function the "whole" lineMetadata als argument and not just the lineText. Shouldn't be that hard, but I'm just preparing for my Englischtest tomorrow and I'm a little out of time to dive into that stuff ;)

Julian

Comment 5

9 years ago
Created attachment 369991 [details] [diff] [review]
fixes missing tab graphics

it's a one-line fix (plus two whitespace eliminations)
(Assignee)

Comment 6

9 years ago
I found a better solution for solving the problem. Just save the lineMetadata to a local varibable and access this from innerPaint again. This means that the getRowMetadata function just has to be called once for getting the lineText (as needed for the SyntaxEngine) as well as the tab informations and not once for the SyntaxEngine and then once more for the innerPaint function.
(Assignee)

Comment 7

9 years ago
Created attachment 370008 [details] [diff] [review]
fixes missing tab graphics as described in Comment #6

Comment 8

9 years ago
Applied in changeset b22fd92ee7df
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Reporter)

Comment 9

9 years ago
Yup, this is fixed. Thanks a bunch!
Status: RESOLVED → VERIFIED
(Reporter)

Updated

9 years ago
Assignee: nobody → julian.viereck
OS: Mac OS X → All
Hardware: x86 → All
(Reporter)

Comment 10

9 years ago
This is a mass migration from Mozilla Labs :: Bespin to Bespin :: Editor.
Component: Bespin → Editor
Product: Mozilla Labs → Bespin
QA Contact: bespin → editor
Whiteboard: editor
Target Milestone: -- → ---
(Reporter)

Updated

9 years ago
Target Milestone: --- → 0.2.0
You need to log in before you can comment on or make changes to this bug.