Make the context slider work again

This commit is contained in:
Felix Holmgren
2010-09-10 03:31:21 +05:00
committed by Nathan Kinsinger
parent 18725fdd65
commit d77d85b807
+4 -2
View File
@@ -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?