(lines []string, lineNum, col int)
| 135 | } |
| 136 | |
| 137 | func adjustUTF8Position(lines []string, lineNum, col int) int { |
| 138 | if lineNum < 0 || lineNum >= len(lines) { |
| 139 | return col |
| 140 | } |
| 141 | |
| 142 | line := lines[lineNum] |
| 143 | |
| 144 | if col > utf8.RuneCountInString(line) { |
| 145 | return utf8.RuneCountInString(line) |
| 146 | } |
| 147 | |
| 148 | return col |
| 149 | } |
| 150 | |
| 151 | func applyInsert(filePath string, lines []string, lineNum, col int, text string, account *types.Account) error { |
| 152 | if lineNum < 0 || lineNum >= len(lines) { |