Skip to content

fixed issues with beacon--post-command() mproved functionality on m1 macs#92

Open
antonhibl wants to merge 5 commits intoMalabarba:masterfrom
antonhibl:master
Open

fixed issues with beacon--post-command() mproved functionality on m1 macs#92
antonhibl wants to merge 5 commits intoMalabarba:masterfrom
antonhibl:master

Conversation

@antonhibl
Copy link

This code adds a new function beacon--vertical-movement-> which checks if the cursor has moved vertically by comparing the line numbers of the previous position and the current position. If the line numbers are different, it means that the cursor has moved vertically.

The beacon--post-command function has been updated to include this new check for vertical movement by adding an or statement for beacon-blink-when-point-moves-vertically and beacon--vertical-movement->.

If you care about supporting M1 chips for this package going forward this is relevant as the package is pretty much not functional on these chips without these changes.

@antonhibl
Copy link
Author

@Malabarba any chance we could take a look at merging this whenever you get the chance? It would be great to get this functionality for M1 chips into the ELPA package.

Copy link
Author

@antonhibl antonhibl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are all the changes made to the code:

  • Updated the beacon--post-command function to include a check for vertical movement by adding an or statement for beacon-blink-when-point-moves-vertically and beacon--vertical-movement->.

  • Improved the docstrings in the beacon--post-command and beacon--vertical-movement-> functions to be more descriptive while complying with the 80-char limit.

These changes should ensure that the beacon is correctly activated whenever the cursor moves up or down on m1 macs using Emacs. For some reason this functionality was not working before.

@Malabarba
Copy link
Owner

Hi Anton, thanks for the PR.

If you want to change the logic for triggering beacon on vertical movement, you probably want to do something around this line.

However, it seems odd that the behavior would change for M1 macs. This package doesn't do anything that would be affected by processor architecture.

Could it be that you're getting thrown off by this line? This line intentionally avoids triggering the beacon on small vertical movements, so that you don't get the beacon popping up whenever hit RET, for instance.

@antonhibl
Copy link
Author

@Malabarba hmm, its possible that those lines were causing an issue for me. However with the base package installed and beacon-mode turned on globally I was getting a lack of the blink effect until I went and made the edits I had made in this PR. Not sure if that is something with the M1 chip but it didn't work for me out of the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants