Goto line bar

Bug #240185 reported by Yuri Malheiros
2
Affects Status Importance Assigned to Milestone
TextFlow
Fix Committed
Wishlist
Waldecir Loureiro dos Santos Filho

Bug Description

Goto line bar is a bottom bar like incremental search where the user put a line number and press enter ou click in a button and TextFlow show the chosen line.

Changed in textflow:
importance: Undecided → Wishlist
milestone: none → 0.3.0
Changed in textflow:
assignee: nobody → waldecir
status: New → In Progress
Revision history for this message
Waldecir Loureiro dos Santos Filho (waldecir) wrote :

i have attached the diff for this feature, please look.

Revision history for this message
Waldecir Loureiro dos Santos Filho (waldecir) wrote :
Revision history for this message
Waldecir Loureiro dos Santos Filho (waldecir) wrote :

I have attached last version of goto bar feature, this patch is full, you dont need any other patch, please comment.

Revision history for this message
Yuri Malheiros (yurimalheiros) wrote :

This patch has a little bug in goto_line method in Search module.

I liked so much the real time verification of line number.

Two things that you need do fix are:
 * Negative numbers must be invalid numbers.
 * If you put a character in entry, this line:

gotoline = int(self.entry.get_text())

returns a error. Catch the exception and change the entry background to red.

Revision history for this message
Waldecir Loureiro dos Santos Filho (waldecir) wrote :

I make some fixes for characters and negative numbers.

now i think this is stable.

Revision history for this message
Yuri Malheiros (yurimalheiros) wrote :

It's cool. One more thing... if you put a number greater than the total lines of file the cursor must stay at the current line.

Revision history for this message
Waldecir Loureiro dos Santos Filho (waldecir) wrote :

here is the incremental patch. You will need last full patch to apply this.

Changed in textflow:
status: In Progress → Fix Committed
Revision history for this message
Tiago Sousa (tiagoboldt) wrote :

Adding a keyboard shortcut would also be great: )

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.