Added label renaming

This commit is contained in:
Alexandros Naskos
2020-06-27 03:16:14 +03:00
parent 4952c34481
commit beb900f1d9
3 changed files with 104 additions and 13 deletions

View File

@@ -1218,7 +1218,7 @@ fn tokenRangeAppend(prev: SourceRange, token: std.zig.Token) SourceRange {
pub fn documentPositionContext(allocator: *std.mem.Allocator, document: types.TextDocument, position: types.Position) !PositionContext {
const line = try document.getLine(@intCast(usize, position.line));
const pos_char = @intCast(usize, position.character) + 1;
const pos_char = @intCast(usize, position.character);
const idx = if (pos_char > line.len) line.len else pos_char;
var arena = std.heap.ArenaAllocator.init(allocator);