zsh-workers
 help / color / mirror / code / Atom feed
From: Bernhard Tittelbach <xro@realraum.at>
To: zsh-workers@zsh.org
Subject: Re: Behaviour of {beginning,end}-of-buffer-or-history
Date: Wed, 01 Jun 2011 21:57:05 +0200	[thread overview]
Message-ID: <is65ie$jtu$1@dough.gmane.org> (raw)

On 2011-06-01 21:43, Bernhard Tittelbach wrote:
> Hi,
>
> recently I was dissatisfied with the behavior of my HOME/END keys.
> What I wanted was this:
>
> If cursor is a beginning/end of the buffer
>   then jump to the beginning/end of the history
> Else
>   jump to the beginning/end of that line,
>   no matter whether we are in a multi- or single-line buffer
>
>
> Seemingly there are functions that do exactly that:
>
> beginning-of-buffer-or-history
>    Move to the beginning of the buffer, or if already there, move to the first
>    event in the history list.
>
> end-of-buffer-or-history
>    Move to the end of the buffer, or if already there, move to the last
>    event in the history list.
>
> But in reality, what above functions really do is this:
>
> If cursor is a beginning/end of a buffer
>   then jump to the beginning/end of the history
> ElseIf cursor is somewhere in a SINGLE-LINE buffer
>   then jump to the beginning/end of the history (why ???)
> Else
>   jump to the beginning/end of the MULTI-LINE buffer
>
>
> I wonder if this is really how these functions are intended to work ?
> At the very least I would consider them misnamed, or does "buffer" really only 
> ever refer to multi-line buffers ?
>
to clarify:

I find it odd that {beginning,end}-of-buffer-or-history jumps to the 
beginning/end of the history and not to the beginning/end of the line
if called on a single-line buffer

Jumping to the beginning/end of a line in a multi-line buffer is just an extra 
my function does, and not something I think {beginning,end}-of-buffer-or-history
should do (it's name does not imply any such functionality :)

cheers,
Bernhard


             reply	other threads:[~2011-06-01 19:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 19:57 Bernhard Tittelbach [this message]
2011-06-02  2:22 ` Bart Schaefer
2011-06-02  3:04   ` Bernhard Tittelbach
2011-06-02 14:25     ` Bart Schaefer
2011-06-02 16:02       ` Bernhard Tittelbach
  -- strict thread matches above, loose matches on Subject: below --
2011-06-01 19:43 Bernhard Tittelbach

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='is65ie$jtu$1@dough.gmane.org' \
    --to=xro@realraum.at \
    --cc=zsh-workers@zsh.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).