mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 22:35:59 +01:00
Use the last value for all unspecified pages per row
This change ensures that configs with "first-page-column=2" before 0.3.4 will upgrade more sanely. Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
4696e10cd8
commit
0e095c1a24
2 changed files with 7 additions and 2 deletions
|
@ -739,8 +739,11 @@ first-page-column
|
||||||
^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^
|
||||||
Defines the column in which the first page will be displayed.
|
Defines the column in which the first page will be displayed.
|
||||||
This setting is stored separately for every value of pages-per-row according to
|
This setting is stored separately for every value of pages-per-row according to
|
||||||
the following pattern <1 page per row>:[<2 pages per row>[: ...]]. Per default,
|
the following pattern <1 page per row>:[<2 pages per row>[: ...]]. The last
|
||||||
the first column is set to 2 for double-page layout.
|
value in the list will be used for all other number of pages per row if not set
|
||||||
|
explicitely.
|
||||||
|
|
||||||
|
Per default, the first column is set to 2 for double-page layout.
|
||||||
|
|
||||||
* Value type: String
|
* Value type: String
|
||||||
* Default value: 1:2
|
* Default value: 1:2
|
||||||
|
|
|
@ -269,6 +269,8 @@ find_first_page_column(const char* first_page_column_list,
|
||||||
unsigned int index = pages_per_row - 1;
|
unsigned int index = pages_per_row - 1;
|
||||||
if (index < settings_size && *settings[index] != '\0') {
|
if (index < settings_size && *settings[index] != '\0') {
|
||||||
first_page_column = atoi(settings[index]);
|
first_page_column = atoi(settings[index]);
|
||||||
|
} else if (*settings[settings_size - 1] != '\0') {
|
||||||
|
first_page_column = atoi(settings[settings_size - 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* free buffers */
|
/* free buffers */
|
||||||
|
|
Loading…
Reference in a new issue