summaryrefslogtreecommitdiff
path: root/src/history.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-21 08:30:39 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-21 08:30:39 +0300
commit911a56b56c4f9ec5d0c4f1fd15189102bc97fcdb (patch)
treed8a6cb36c6a7cacad9cd1b8c94755f3f974084e4 /src/history.c
parent548034e167bd94d21ef9bcc2e6d2d8cbfaeb3d06 (diff)
Added identity exporting
Exporting an identity will display it in a new tab in PEM encoded format, where it can be saved or copied. IssueID #236
Diffstat (limited to 'src/history.c')
-rw-r--r--src/history.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/history.c b/src/history.c
index 9f4e415b..ed8e6725 100644
--- a/src/history.c
+++ b/src/history.c
@@ -243,7 +243,7 @@ void add_History(iHistory *d, const iString *url ){
243 243
244iBool goBack_History(iHistory *d) { 244iBool goBack_History(iHistory *d) {
245 lock_Mutex(d->mtx); 245 lock_Mutex(d->mtx);
246 if (d->recentPos < size_Array(&d->recent) - 1) { 246 if (!isEmpty_Array(&d->recent) && d->recentPos < size_Array(&d->recent) - 1) {
247 d->recentPos++; 247 d->recentPos++;
248 postCommandf_Root(get_Root(), 248 postCommandf_Root(get_Root(),
249 "open history:1 scroll:%f url:%s", 249 "open history:1 scroll:%f url:%s",
@@ -279,7 +279,8 @@ iBool atLatest_History(const iHistory *d) {
279 279
280iBool atOldest_History(const iHistory *d) { 280iBool atOldest_History(const iHistory *d) {
281 iBool isOldest; 281 iBool isOldest;
282 iGuardMutex(d->mtx, isOldest = (d->recentPos == size_Array(&d->recent) - 1)); 282 iGuardMutex(d->mtx, isOldest = (isEmpty_Array(&d->recent) ||
283 d->recentPos == size_Array(&d->recent) - 1));
283 return isOldest; 284 return isOldest;
284} 285}
285 286