restore compilation with gcc 4.7

This commit is contained in:
Maxime Coste 2013-06-18 21:43:44 +02:00
parent ea9414fa21
commit 3e9439ac9f
3 changed files with 7 additions and 6 deletions

View File

@ -19,7 +19,7 @@ Building
Kakoune dependencies are: Kakoune dependencies are:
* GCC >= 4.8 * GCC >= 4.7
* boost * boost
* ncurses * ncurses

View File

@ -92,7 +92,7 @@ void goto_commands(Context& context)
case 'j': case 'j':
{ {
context.push_jump(); context.push_jump();
editor.select(editor.buffer().line_count() - 1, mode); editor.select({editor.buffer().line_count() - 1, 0}, mode);
break; break;
} }
case 'e': case 'e':
@ -103,7 +103,7 @@ void goto_commands(Context& context)
if (context.has_window()) if (context.has_window())
{ {
auto line = context.window().position().line; auto line = context.window().position().line;
editor.select(line, mode); editor.select({line, 0}, mode);
} }
break; break;
case 'b': case 'b':
@ -111,7 +111,7 @@ void goto_commands(Context& context)
{ {
auto& window = context.window(); auto& window = context.window();
auto line = window.position().line + window.dimensions().line - 1; auto line = window.position().line + window.dimensions().line - 1;
editor.select(line, mode); editor.select({line, 0}, mode);
} }
break; break;
case 'c': case 'c':
@ -119,7 +119,7 @@ void goto_commands(Context& context)
{ {
auto& window = context.window(); auto& window = context.window();
auto line = window.position().line + window.dimensions().line / 2; auto line = window.position().line + window.dimensions().line / 2;
editor.select(line, mode); editor.select({line, 0}, mode);
} }
break; break;
case 'a': case 'a':

View File

@ -72,7 +72,8 @@ private:
struct SelectionList : std::vector<Selection> struct SelectionList : std::vector<Selection>
{ {
using std::vector<Selection>::vector; SelectionList() = default;
SelectionList(Selection s) : std::vector<Selection>{s} {}
void update_insert(const Buffer& buffer, const BufferCoord& begin, const BufferCoord& end); void update_insert(const Buffer& buffer, const BufferCoord& begin, const BufferCoord& end);
void update_erase(const Buffer& buffer, const BufferCoord& begin, const BufferCoord& end); void update_erase(const Buffer& buffer, const BufferCoord& begin, const BufferCoord& end);