From 8bf93b50f043fc9e6d52ce07105f7b4dcd11687a Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 12 Jul 2009 02:20:47 +0000 Subject: Use additional selection colour for additional selections even when window is primary. When selection alpha is set, set additional selection alpha to same value so that editors unaware of multiple selection behave OK. --- src/Editor.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 976ec0c7c..ad9437a6a 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2122,9 +2122,9 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou } ColourAllocated Editor::SelectionBackground(ViewStyle &vsDraw, bool main) { - return primarySelection ? - (main ? vsDraw.selbackground.allocated : vsDraw.selAdditionalBackground.allocated) : - vsDraw.selbackground2.allocated; + return main ? + (primarySelection ? vsDraw.selbackground.allocated : vsDraw.selbackground2.allocated) : + vsDraw.selAdditionalBackground.allocated; } ColourAllocated Editor::TextBackground(ViewStyle &vsDraw, bool overrideBackground, @@ -2258,7 +2258,7 @@ void Editor::DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, Lin if (!hideSelection && ((vsDraw.selAlpha == SC_ALPHA_NOALPHA) || (vsDraw.selAdditionalAlpha == SC_ALPHA_NOALPHA))) { SelectionSegment virtualSpaceRange(SelectionPosition(pdoc->LineEnd(line)), SelectionPosition(pdoc->LineEnd(line), sel.VirtualSpaceFor(pdoc->LineEnd(line)))); for (size_t r=0; r