Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1193)

Issue 124106: rietveld: correct tab handling (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 1 month ago by rsc_swtch
Modified:
15 years, 1 month ago
Reviewers:
GvR
Base URL:
http://rietveld.googlecode.com/svn/trunk/
Visibility:
Public.

Description

This fixes the buggy tab rendering that can be seen at http://codereview.appspot.com/116075/diff/1/2 The fundamental problem was that the tab code was not being told what column the text began in, so it didn't know where to put the tab stops. Another problem was that some of the code assumed that string byte offsets were the same as column offsets, which is only true if there are no tabs. In the process of fixing this, I cleaned up the arguments to Fold and ExpandTabs and renamed them Break and _ExpandTabs so that I could be sure that I found all the call sites. I also wanted to verify that ExpandTabs was not being used from outside intra_region_diff.py.

Patch Set 1 #

Patch Set 2 : fix coloring of diffs #

Patch Set 3 : rebase patch set 2 on r476 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -70 lines) Patch
M codereview/engine.py View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M codereview/intra_region_diff.py View 1 2 6 chunks +62 lines, -66 lines 0 comments Download

Messages

Total messages: 9
rsc_swtch
(I assume the description will be sent as part of the mail.)
15 years, 1 month ago (2009-10-03 23:02:17 UTC) #1
rsc_swtch
ping
15 years, 1 month ago (2009-10-22 08:23:38 UTC) #2
GvR
Hmmm... There are several things not right. I patched this into Rietveld and you can ...
15 years, 1 month ago (2009-10-24 17:50:03 UTC) #3
rsc_swtch
On 2009/10/24 17:50:03, GvR wrote: > Hmmm... There are several things not right. I patched ...
15 years, 1 month ago (2009-10-24 18:11:24 UTC) #4
rsc_swtch
On 2009/10/24 18:11:24, rsc wrote: > On 2009/10/24 17:50:03, GvR wrote: > > Hmmm... There ...
15 years, 1 month ago (2009-10-24 18:58:34 UTC) #5
rsc_swtch
> > I looked at this when I was working on the patch and > ...
15 years, 1 month ago (2009-10-24 19:52:06 UTC) #6
GvR
Live, with some docstring tweaks and mark_tabs=True.
15 years, 1 month ago (2009-10-24 23:39:10 UTC) #7
GvR
On 2009/10/24 23:39:10, GvR wrote: > Live, with some docstring tweaks and mark_tabs=True. (And submitted ...
15 years, 1 month ago (2009-10-24 23:40:50 UTC) #8
rsc_swtch
15 years, 1 month ago (2009-10-24 23:47:12 UTC) #9
> (And submitted as r478.)

Thanks.

> I'll entertain a fix to add new Account setting to disable the tab marking
> behavior (which I'm guessing you're not too fond of :-).

They're fine with me.  Just as you can use them to say
"hey, don't use tabs here", I can use (the lack of) them
to say "hey, don't use spaces here".
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b