Fix completion offset calculation for partial values with spaces

Yo yo. All your tests pass - Merge me!