Code52/DownmarkerWPF — pull request #272 by belfryimages (2012-05-15 13:21:27+00:00)
Title: #234 copy through leading whitespace on new line, also refactor previewk...

...eydown

I don't know why AvalonEdit does this, possibly it's just some option that needs to be set but I couldn't find anything so this works around the problem by copying leading white space before the new line being inserted. This handles multiple spaces, tabs, and a combination of both, keeping the same indentation level on the inserted line.

While I was at it I did a crude refactor which plugins should eventually be able to take advantage of. It will need to be replaced with a combination of MEF and C.M when plugin support is merged in.