summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vlib/unix/cli.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vlib/unix/cli.c b/src/vlib/unix/cli.c
index 3df9a98ffb1..512a77aa8f7 100644
--- a/src/vlib/unix/cli.c
+++ b/src/vlib/unix/cli.c
@@ -1832,7 +1832,7 @@ unix_cli_line_process_one (unix_cli_main_t * cm,
case UNIX_CLI_PARSE_ACTION_PAGER_NEXT:
case UNIX_CLI_PARSE_ACTION_PAGER_PGDN:
/* show next page of the buffer */
- if (cf->height + cf->pager_start < vec_len (cf->pager_index))
+ if (cf->height + cf->pager_start <= vec_len (cf->pager_index))
{
u8 *line = NULL;
unix_cli_pager_index_t *pi = NULL;
@@ -1863,7 +1863,7 @@ unix_cli_line_process_one (unix_cli_main_t * cm,
case UNIX_CLI_PARSE_ACTION_PAGER_DN:
case UNIX_CLI_PARSE_ACTION_PAGER_CRLF:
/* display the next line of the buffer */
- if (cf->pager_start < vec_len (cf->pager_index) - (cf->height - 1))
+ if (cf->height + cf->pager_start <= vec_len (cf->pager_index))
{
u8 *line;
unix_cli_pager_index_t *pi;
12 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170