diff options
author | Gerd Moellmann <[email protected]> | 1999-08-25 21:12:36 +0000 |
---|---|---|
committer | Gerd Moellmann <[email protected]> | 1999-08-25 21:12:36 +0000 |
commit | 5878ee6fc41906578910f760f098452b1880b792 (patch) | |
tree | cf8319f4b899e528c71ac3457a311c742e3159f0 /src/syntax.c | |
parent | 89ee2bf6202076a005a699e4de57afcd55f26c04 (diff) |
(Fforward_word): If in a mini-buffer and moving
backwards, stop in front of the prompt to prevent accidentially
moving into the read-only prompt.
Diffstat (limited to 'src/syntax.c')
-rw-r--r-- | src/syntax.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/syntax.c b/src/syntax.c index 233f798025..71a2080836 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -1214,6 +1214,17 @@ and nil is returned.") SET_PT (XINT (count) > 0 ? ZV : BEGV); return Qnil; } + + /* If in a mini-buffer and moving backwards, stop in front of the + prompt if we are currently in front of it. This prevents + accidentially moving into the read-only prompt. */ + if (INTEGERP (current_buffer->minibuffer_prompt_length)) + { + int prompt_end = XFASTINT (current_buffer->minibuffer_prompt_length); + if (PT > prompt_end && val < prompt_end) + val = prompt_end; + } + SET_PT (val); return Qt; } |