~sircmpwn/gmni-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH gmni 1/2] gmnlm: Improve paging behavior on narrow terminals

Details
Message ID
<20210402133101.21761-1-zachdecook@librem.one>
DKIM signature
missing
Download raw message
Patch: +6 -2
---
 src/gmnlm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/gmnlm.c b/src/gmnlm.c
index c59e68c..8c8b3d7 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -845,6 +845,10 @@ display_gemini(struct browser *browser, struct gemini_response *resp)
	int row = 0, col = 0;
	struct gemini_token tok;
	struct link **next = &browser->links;
	// When your screen is too narrow, more lines will be used for helptext and URL.
	// 87 is the maximum width of the prompt.
	int info_rows = (ws.ws_col >= 87) ? 4 : 6;

	while (text != NULL || gemini_parser_next(&p, &tok) == 0) {
repeat:
		switch (tok.token) {
@@ -933,7 +937,7 @@ repeat:
		if (text) {
			int w = wrap(out, text, &ws, &row, &col);
			text += w;
			if (text[0] && row < ws.ws_row - 4) {
			if (text[0] && row < ws.ws_row - info_rows) {
				continue;
			}

@@ -951,7 +955,7 @@ repeat:
		}
		++row; col = 0;

		if (browser->pagination && row >= ws.ws_row - 4) {
		if (browser->pagination && row >= ws.ws_row - info_rows) {
			char prompt[4096];
			char *end = NULL;
			if (browser->meta && (end = strchr(resp->meta, ';')) != NULL) {
-- 
2.31.0

[PATCH gmni 2/2] gmnlm: Include blank line to frame browser window when reading more

Details
Message ID
<20210402133101.21761-2-zachdecook@librem.one>
In-Reply-To
<20210402133101.21761-1-zachdecook@librem.one> (view parent)
DKIM signature
missing
Download raw message
Patch: +1 -0
---
 src/gmnlm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gmnlm.c b/src/gmnlm.c
index 8c8b3d7..57c79cf 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -978,6 +978,7 @@ repeat:
			switch (result) {
			case PROMPT_AGAIN:
			case PROMPT_MORE:
				printf("\n");
				break;
			case PROMPT_QUIT:
				browser->running = false;
-- 
2.31.0

Re: [PATCH gmni 2/2] gmnlm: Include blank line to frame browser window when reading more

Details
Message ID
<CADE4TL6YH1D.4P9LTTKJARW0@taiga>
In-Reply-To
<20210402133101.21761-2-zachdecook@librem.one> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
Thanks!

To git@git.sr.ht:~sircmpwn/gmni
   e0993d4..77b73ef  master -> master
Reply to thread Export thread (mbox)