Skip to content

Commit

Permalink
focus rulers after global theme change. Fixes #27
Browse files Browse the repository at this point in the history
  • Loading branch information
radiovisual committed Apr 13, 2016
1 parent 02e9d53 commit d17a880
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,12 @@ ipc.on('settings-changed', () => {
// Update the themes of all open rulers on default theme change
ipc.on('apply-default-theme', (evt, data) => {
rulers.forEach(ruler => ruler.send('update-theme', {filename: data.filename}));

// Focus all rulers temporarily to apply the changes.
// See: https://github.com/mikaa123/linear/issues/27
setTimeout(() => {
rulers.forEach(ruler => ruler.focus());
}, 300);
});

// Duplicate a given ruler.
Expand Down

0 comments on commit d17a880

Please sign in to comment.