Skip to content

Commit

Permalink
add version and clear search on new page
Browse files Browse the repository at this point in the history
  • Loading branch information
RealMelkor committed Nov 3, 2022
1 parent eb47b15 commit 793fb13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gemini.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ void gmi_freetab(struct gmi_tab* tab) {
}

char home_page[] =
"20 text/gemini\r\n# Vgmi\n\n" \
"20 text/gemini\r\n# Vgmi - " VERSION "\n\n" \
"A Gemini client written in C with vim-like keybindings\n\n" \
"## Bookmarks\n\n" \
"%s\n" \
Expand Down Expand Up @@ -1570,6 +1570,7 @@ void* gmi_request_thread(struct gmi_tab* tab) {
if (!tab->request.download &&
tab->request.recv > 0 &&
tab->page.code == 20) {
tab->search.entry[0] = '\0';
struct gmi_link* link_ptr = tab->history?
tab->history->prev:NULL;
for (int i = 0; i < MAX_CACHE; i++) {
Expand Down
2 changes: 2 additions & 0 deletions src/gemini.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#ifndef _GEMINI_H_
#define _GEMINI_H_

#define VERSION "1.4"

#include <netdb.h>
#include <unistd.h>
#include <stddef.h>
Expand Down

0 comments on commit 793fb13

Please sign in to comment.