9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Sean Hinchee <henesy.dev@gmail.com>
To: 9front@9front.org
Subject: [9front] rio ctrlb patch
Date: Mon, 3 Sep 2018 14:19:12 -0500	[thread overview]
Message-ID: <b7d2887a-8a80-7405-fc1d-28476f891f35@gmail.com> (raw)

Here's a patch courtesy of mora/noise that's been on my vps for awhile 
which changes the ctrl+b functionality to go to the end of the 
bottom-most line rather than just to the prompt.

That is, if text is already present on the line you don't have to press 
ctrl+b ctrl+e and functionality with no text entered is the same as the 
existing ctrl+b functionality.

diff -r eecec6d3b341 sys/src/cmd/rio/wind.c
--- a/sys/src/cmd/rio/wind.c	Mon Sep 03 20:54:26 2018 +0200
+++ b/sys/src/cmd/rio/wind.c	Mon Sep 03 14:09:42 2018 -0500
@@ -675,6 +675,10 @@
  			return;
  		case Kstx:	/* ^B: output point */
  			wsetselect(w, w->qh, w->qh);
+			q0 = w->q0;
+			while(q0 < w->nr && w->r[q0]!='\n')
+				q0++;
+			wsetselect(w, q0, q0);
  			wshow(w, w->q0);
  			return;
  		}

Cheers,
Sean


                 reply	other threads:[~2018-09-03 19:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b7d2887a-8a80-7405-fc1d-28476f891f35@gmail.com \
    --to=henesy.dev@gmail.com \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).