1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

We don't have a negative page number.

This commit is contained in:
Dave Davenport 2016-05-10 17:51:23 +02:00
parent 6070826c4d
commit 09437e3f0e
3 changed files with 11 additions and 11 deletions

View file

@ -39,15 +39,15 @@ typedef struct
typedef enum
{
TB_AUTOHEIGHT = 1 << 0,
TB_AUTOWIDTH = 1 << 1,
TB_LEFT = 1 << 16,
TB_RIGHT = 1 << 17,
TB_CENTER = 1 << 18,
TB_EDITABLE = 1 << 19,
TB_MARKUP = 1 << 20,
TB_WRAP = 1 << 21,
TB_PASSWORD = 1 << 22,
TB_AUTOHEIGHT = 1 << 0,
TB_AUTOWIDTH = 1 << 1,
TB_LEFT = 1 << 16,
TB_RIGHT = 1 << 17,
TB_CENTER = 1 << 18,
TB_EDITABLE = 1 << 19,
TB_MARKUP = 1 << 20,
TB_WRAP = 1 << 21,
TB_PASSWORD = 1 << 22,
} TextboxFlags;
typedef enum

View file

@ -28,7 +28,7 @@ struct RofiViewState
int update;
int refilter;
int rchanged;
int cur_page;
unsigned int cur_page;
// Entries
textbox *text;

View file

@ -862,7 +862,7 @@ static unsigned int rofi_scroll_per_page ( RofiViewState * state )
}
else{
// Do paginating
int page = ( state->max_elements > 0 ) ? ( state->selected / state->max_elements ) : 0;
unsigned int page = ( state->max_elements > 0 ) ? ( state->selected / state->max_elements ) : 0;
offset = page * state->max_elements;
state->last_offset = offset;
if ( page != state->cur_page ) {