edit command button tries to edit wrong command after a search

Bug #738264 reported by Duane Hinnen
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
CLI Companion
Fix Released
Medium
Unassigned

Bug Description

After you perform a search and try and edit a command, it pulls up the wrond command. The command that appears in the dialog is not the command you highlighted in the command list.

What should happen is when you highlight a command and click edit, the command that appears in the Edit dialog should be the command you selected before clicking edit.

To Reproduce:
expand the command list
enter a search in the search bar. i.e free
Then highlight a command. i.e free -m
The edit dialog opens to edit the command. However it is the wrong command. i.e. Not the free-m command

It looks like it is pulling up the command from the un filtered command list. The list from before the search.

Related branches

Changed in clicompanion:
importance: Undecided → Medium
Changed in clicompanion:
status: New → Confirmed
Revision history for this message
Marek Bardoński (bdfhjk) wrote :

I blocked accidentaly edit/remove not necessary command in my branch

Reason of bug:

controller.py:
193: row_int = int(view.ROW[0][0])

and
remove.py
293: row_int = int(view.ROW[0][0]) #convert pathlist into something usable

in this line program assigned to this variable number of row in filtered view. But in

remove.py
298: del cheatlines[row_int]

program deleted line in not filtered order, by index of filtered view row

My proposition for fix:
- if we have filtered view, firstly search in CHEATSHEET corresponding row_int in non-filtered view

Changed in clicompanion:
status: Confirmed → In Progress
Changed in clicompanion:
status: In Progress → Fix Committed
David Caro (dcaro)
Changed in clicompanion:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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