From c87b7a0a0a422f58515f01bf1b25be2b3faf410f Mon Sep 17 00:00:00 2001
From: Leigh B Stoller <stoller@flux.utah.edu>
Date: Tue, 2 Sep 2014 14:55:41 -0600
Subject: [PATCH] Don't go negative on the Extend modal character count.

---
 www/aptui/js/status.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/www/aptui/js/status.js b/www/aptui/js/status.js
index ae088d7f83..db32c771f3 100644
--- a/www/aptui/js/status.js
+++ b/www/aptui/js/status.js
@@ -123,6 +123,9 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal,
 	    $('#why_extend').on('focus keyup', function (e) {
 		var len   = $('#why_extend').val().length;
 		var left  = 120 - len;
+		if (left < 0) {
+		    left = 0;
+		}
 		var msg   = "You need at least " + left + " more characters";
 		$('#extend_counter_msg').html(msg);
 	    });
-- 
GitLab