Mercurial > vim
comparison src/dict.c @ 17905:fb773f73a4be v8.1.1949
patch 8.1.1949: cannot scroll a popup window to the very bottom
Commit: https://github.com/vim/vim/commit/8c6173c7d3431dd8bc2b6ffc076ef49512a7e175
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 30 22:08:34 2019 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 30 Aug 2019 22:15:04 +0200 |
parents | 0f7ae8010787 |
children | 2ec4ed3f5e12 |
comparison
equal
deleted
inserted
replaced
17904:d3e61b35a3b6 | 17905:fb773f73a4be |
---|---|
615 * Returns 0 if the entry doesn't exist. | 615 * Returns 0 if the entry doesn't exist. |
616 */ | 616 */ |
617 varnumber_T | 617 varnumber_T |
618 dict_get_number(dict_T *d, char_u *key) | 618 dict_get_number(dict_T *d, char_u *key) |
619 { | 619 { |
620 return dict_get_number_def(d, key, 0); | |
621 } | |
622 | |
623 /* | |
624 * Get a number item from a dictionary. | |
625 * Returns "def" if the entry doesn't exist. | |
626 */ | |
627 varnumber_T | |
628 dict_get_number_def(dict_T *d, char_u *key, int def) | |
629 { | |
620 dictitem_T *di; | 630 dictitem_T *di; |
621 | 631 |
622 di = dict_find(d, key, -1); | 632 di = dict_find(d, key, -1); |
623 if (di == NULL) | 633 if (di == NULL) |
624 return 0; | 634 return def; |
625 return tv_get_number(&di->di_tv); | 635 return tv_get_number(&di->di_tv); |
626 } | 636 } |
627 | 637 |
628 /* | 638 /* |
629 * Get a number item from a dictionary. | 639 * Get a number item from a dictionary. |