joostkremers / writeroom-mode

Writeroom-mode: distraction-free writing for Emacs.
BSD 3-Clause "New" or "Revised" License
611 stars 28 forks source link

margins disappear when cursor is at code snippet with polymode #41

Closed anildigital closed 6 years ago

anildigital commented 7 years ago

Hi, I am using polymode i.e. poly-markdown-mode to be specific. I noticed when I point to cursor at code snippet.. margins disappear and when I click outside, margins come back

Here is gif of issue I am talking about. yfmz3kdip6

joostkremers commented 7 years ago

Judging by the gif you posted, it's not just the margins that disappear, it's all of writeroom-mode that is disabled. I have no idea how exactly polymode works, but it looks like the major mode is changed inside the code snippet, causing writeroom-mode to be disabled.

I'd have to look into the inner workings of polymode to find out exactly what is going on, but I currently don't have the time to do that.

Perhaps the author of polymode might be able to help, or, you point him to this issue, we might come to a solution more quickly.

vspinu commented 6 years ago

Fixed on polymode side. Minor modes that should be activated in all polymode indirect buffers must be added to polymode-move-these-minor-modes-from-old-buffer list.

joostkremers commented 6 years ago

Great! :+1: