Re: [PATCH] [PATCH] git-gui: Add hotkeys to set widget focus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 2, 2019 at 8:19 PM Pratyush Yadav <me@xxxxxxxxxxxxxxxxx> wrote:
> You missed removing this extra blank line. Will fix it up locally.
>
> > +             set _index $file_lists_last_clicked($widget)
> [snip]


To be honest I felt the blank line there was appropriate, in an
attempt to follow the same code style as the rest of the git-gui.sh.
For instance, the "add_range_to_selection" function
(https://github.com/prati0100/git-gui/blob/master/git-gui.sh#L2601-L2625)
has blank lines like this;


proc add_range_to_selection {w x y} {
    global file_lists last_clicked selected_paths

    if {[lindex $last_clicked 0] ne $w} {
        toggle_or_diff click $w $x $y
        return
    }

    set lno [lindex [split [$w index @$x,$y] .] 0]
    set lc [lindex $last_clicked 1]
    if {$lc < $lno} {
        set begin $lc
        set end $lno
    } else {
        set begin $lno
        set end $lc
    }

    foreach path [lrange $file_lists($w) \
        [expr {$begin - 1}] \
        [expr {$end - 1}]] {
        set selected_paths($path) 1
    }
    $w tag add in_sel $begin.0 [expr {$end + 1}].0
}


Not saying the blank line should defintely be there, I'm just saying
my reasoning for keeping it there in the first place :-)


Birger



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux