fix linux build

This commit is contained in:
Vadim Lopatin 2014-04-23 10:28:25 +04:00
parent 4ffb33f0ae
commit c335a6dd5f
2 changed files with 15 additions and 5 deletions

View File

@ -1104,7 +1104,17 @@ version(linux) {
Log.i("exiting message loop");
return 0;
}
XCBWindow[xcb_window_t] _windowMap;
/// retrieves text from clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)
override dstring getClipboardText(bool mouseBuffer = false) {
return ""d;
}
/// sets text to clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)
override void setClipboardText(dstring text, bool mouseBuffer = false) {
}
protected XCBWindow[xcb_window_t] _windowMap;
}
// entry point

View File

@ -242,7 +242,7 @@ class EditableContent {
dstring lineText = line(lineIndex);
dstring lineFragment = lineText;
int startchar = 0;
int endchar = lineText.length;
int endchar = cast(int)lineText.length;
if (lineIndex == range.start.line)
startchar = range.start.pos;
if (lineIndex == range.end.line)
@ -319,11 +319,11 @@ class EditableContent {
rangeAfter.end = rangeAfter.start;
if (newcontent.length > 1) {
// different lines
rangeAfter.end.line = rangeAfter.start.line + newcontent.length - 1;
rangeAfter.end.pos = newcontent[$ - 1].length;
rangeAfter.end.line = rangeAfter.start.line + cast(int)newcontent.length - 1;
rangeAfter.end.pos = cast(int)newcontent[$ - 1].length;
} else {
// same line
rangeAfter.end.pos = rangeAfter.start.pos + newcontent[0].length;
rangeAfter.end.pos = rangeAfter.start.pos + cast(int)newcontent[0].length;
}
replaceRange(rangeBefore, rangeAfter, newcontent);
handleContentChange(op, rangeBefore, rangeAfter);