I have text consisting of several similar blocks as follows:

aaaa #last line visible (A)
bbbb #last line visible (B)

The screen is 5 lines high. The cursor is at the very first a.
I define a macro as such: f3 → ↓ ← ↓ f4 (go 2 lines down with detour)
Then I press f4 repeatedly to execute the macro. In scenario B everything is fine: the cursor stays always in col 1.
But in scenario A the cursor moves one char to the right with every overstepping of the lower end of the view.
I can work around this by starting my macro with C-l C-l and choosing a large enough window size. But what is causing this behavior? Is this expected behavior?

Stuff I tried:
f3 ↓ ↓ f4 works
f3 → → ↓ ← ← ↓ f4 right drift by 2
f3 → → ↓ ← ↓ f4 right drift by 1
f3 → ↓ ← ← ↓ f4 right drift by 2
f3 → → → ↓ ← ← ← ↓ f4 right drift by 3
(right drift means difference to expected column, e.g. macro 4 should go 1 col to the left, goes 1 col to the right -> right drift of 2)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.