void SetCursorIndex(size_t i) { m_cursor_index = i; }
size_t GetCursorIndex() const { return m_cursor_index; }
- void SetCursorCharPosition(int pos) { m_cursor_char_position = pos; }
- int GetCursorCharPosition() const { return m_cursor_char_position; }
+ void SetCursorCharPosition(size_t pos) { m_cursor_char_position = pos; }
+ size_t GetCursorCharPosition() const { return m_cursor_char_position; }
/// Adds a possible completion string. If the completion was already
/// suggested before, it will not be added to the list of results. A copy of
/// The index of the argument in which the completion cursor is.
size_t m_cursor_index;
/// The cursor position in the argument indexed by m_cursor_index.
- int m_cursor_char_position;
+ size_t m_cursor_char_position;
/// The result this request is supposed to fill out.
/// We keep this object private to ensure that no backend can in any way
std::string command = "a bad c";
const unsigned cursor_pos = 3;
const size_t arg_index = 1;
- const int arg_cursor_pos = 1;
+ const size_t arg_cursor_pos = 1;
StringList matches;
CompletionResult result;
EXPECT_STREQ(request.GetRawLine().str().c_str(), command.c_str());
EXPECT_EQ(request.GetRawCursorPos(), cursor_pos);
EXPECT_EQ(request.GetCursorIndex(), 3U);
- EXPECT_EQ(request.GetCursorCharPosition(), 0);
+ EXPECT_EQ(request.GetCursorCharPosition(), 0U);
EXPECT_EQ(request.GetPartialParsedLine().GetArgumentCount(), 4U);
EXPECT_STREQ(request.GetPartialParsedLine().GetArgumentAtIndex(3), "");
std::string command = "a bad c";
const unsigned cursor_pos = 3;
const size_t arg_index = 1;
- const int arg_cursor_pos = 1;
+ const size_t arg_cursor_pos = 1;
StringList matches;
CompletionResult result;