MacDownApp / macdown

Open source Markdown editor for macOS.
https://macdown.uranusjr.com/
9.43k stars 1.09k forks source link

Only the first range is styled in discontinuous selections #582

Open benjaminmiller opened 8 years ago

benjaminmiller commented 8 years ago

All ranges in a discontinuous selection should have a style applied.

to reproduce:

  1. Select, using the cmd key, a number of different words from a paragraph.
  2. Make the text bold by selecting Format > Strong or cmd-B keyboard shortcut.
  3. Only the first word is styled bold.
uranusjr commented 8 years ago

Whoa, I didn’t even realise multiple selection is possible! The current implementation assumes it is not, hence the behaviour. I’ll fix this.