Skip to content

Commit

Permalink
change statusbar to show file:col:line fix HaikuArchives#68
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzvd committed Jul 26, 2021
1 parent c764e3d commit deeeff2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Sources/PDoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@
static int32 sDocCount = 0;

const float
kStatusWidth = 80;
kStatusWidth = 280; // not sure if this value makes sense, longer
// file paths will be obscured by scrollbar

PDoc::PDoc(const entry_ref *doc, bool show)
: inherited(doc)
Expand Down
4 changes: 2 additions & 2 deletions Sources/PStatus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ void PStatus::Draw(BRect updateRect)

SetHighColor(kBlack);
MovePenTo(3, fBaseline);
char s[32];
char s[100];
int32 line = fText->Offset2Line(fOffset);
sprintf(s, "%" B_PRId32 ",%" B_PRId32, line + 1, fText->Offset2Column(fOffset) + 1);
sprintf(s, "%s" ":%" B_PRId32 ":%" B_PRId32, fPath, line + 1, fText->Offset2Column(fOffset) + 1);
DrawString(s);
} /* PStatus::Draw */

Expand Down

0 comments on commit deeeff2

Please sign in to comment.