summaryrefslogtreecommitdiff
path: root/pkg/gui/diffview.go
diff options
context:
space:
mode:
authorIbrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>2018-12-05 02:19:41 +0300
committerGitHub <noreply@github.com>2018-12-05 02:19:41 +0300
commit5c481dfe96fc40b8b7ad4fdc63fa0968e6832939 (patch)
tree6442b45aeac0e88e83656e871c0e0872d59e4044 /pkg/gui/diffview.go
parentDevelop (#20) (diff)
downloadgitbatch-5c481dfe96fc40b8b7ad4fdc63fa0968e6832939.tar.gz
Develop (#23)
* restyle on repository selection * restyle continued on selections * added initial logging to git package * reverse scrolling on commits implemented * queue converted to first in first out principle * added sorting * select all feature added * code reuse improved and added scrolling to controls view * update readme
Diffstat (limited to 'pkg/gui/diffview.go')
-rw-r--r--pkg/gui/diffview.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/pkg/gui/diffview.go b/pkg/gui/diffview.go
index 06038d8..6f512ce 100644
--- a/pkg/gui/diffview.go
+++ b/pkg/gui/diffview.go
@@ -54,39 +54,6 @@ func (gui *Gui) closeCommitDiffView(g *gocui.Gui, v *gocui.View) error {
return nil
}
-// cursor down acts like half-page down for faster scrolling
-func (gui *Gui) commitCursorDown(g *gocui.Gui, v *gocui.View) error {
- if v != nil {
- ox, oy := v.Origin()
- _, vy := v.Size()
-
- // TODO: do something when it hits bottom
- if err := v.SetOrigin(ox, oy+vy/2); err != nil {
- return err
- }
- }
- return nil
-}
-
-// cursor up acts like half-page up for faster scrolling
-func (gui *Gui) commitCursorUp(g *gocui.Gui, v *gocui.View) error {
- if v != nil {
- ox, oy := v.Origin()
- _, vy := v.Size()
-
- if oy-vy/2 > 0 {
- if err := v.SetOrigin(ox, oy-vy/2); err != nil {
- return err
- }
- } else if oy-vy/2 <= 0 {
- if err := v.SetOrigin(0, 0); err != nil {
- return err
- }
- }
- }
- return nil
-}
-
// colorize the plain diff text collected from system output
// the style is near to original diff command
func colorizeDiff(original string) (colorized []string) {