From d77d85b8073167249cfb8649b5612d6980276861 Mon Sep 17 00:00:00 2001 From: Felix Holmgren Date: Fri, 10 Sep 2010 03:31:21 +0500 Subject: [PATCH] Make the context slider work again --- html/views/commit/commit.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/html/views/commit/commit.js b/html/views/commit/commit.js index dfa9d34..849d9d5 100644 --- a/html/views/commit/commit.js +++ b/html/views/commit/commit.js @@ -1,7 +1,7 @@ /* Commit: Interface for selecting, staging, discarding, and unstaging hunks, individual lines, or ranges of lines. */ -var contextLines = 5; +var contextLines = 0; var showNewFile = function(file) { @@ -39,6 +39,7 @@ var setTitle = function(status) { var displayContext = function() { $("contextSize").style.display = ""; $("contextTitle").style.display = ""; + contextLines = $("contextSize").value; } var showFileChanges = function(file, cached) { @@ -51,7 +52,8 @@ var showFileChanges = function(file, cached) { hideState(); $("contextSize").oninput = function(element) { - contextSize = $("contextSize").value; + contextLines = $("contextSize").value; + Controller.refresh(); } if (file.status == 0) // New file?