patch 8.1.1949: cannot scroll a popup window to the very bottom
Problem: Cannot scroll a popup window to the very bottom.
Solution: Scroll to the bottom when the "firstline" property was set to -1.
(closes #4577) Allow resetting min/max width/height.
diff --git a/src/dict.c b/src/dict.c
index b2c3fbc..649a7da 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -617,11 +617,21 @@
varnumber_T
dict_get_number(dict_T *d, char_u *key)
{
+ return dict_get_number_def(d, key, 0);
+}
+
+/*
+ * Get a number item from a dictionary.
+ * Returns "def" if the entry doesn't exist.
+ */
+ varnumber_T
+dict_get_number_def(dict_T *d, char_u *key, int def)
+{
dictitem_T *di;
di = dict_find(d, key, -1);
if (di == NULL)
- return 0;
+ return def;
return tv_get_number(&di->di_tv);
}