nextDiff moves to next diff region
(ab int)
| 220 | |
| 221 | // nextDiff moves to next diff region |
| 222 | func (dv *DiffEditor) nextDiff(ab int) bool { |
| 223 | tva, tvb := dv.textEditors() |
| 224 | tv := tva |
| 225 | if ab == 1 { |
| 226 | tv = tvb |
| 227 | } |
| 228 | nd := len(dv.alignD) |
| 229 | curLn := tv.CursorPos.Ln |
| 230 | di, df := dv.alignD.DiffForLine(curLn) |
| 231 | if di < 0 { |
| 232 | return false |
| 233 | } |
| 234 | for { |
| 235 | di++ |
| 236 | if di >= nd { |
| 237 | return false |
| 238 | } |
| 239 | df = dv.alignD[di] |
| 240 | if df.Tag != 'e' { |
| 241 | break |
| 242 | } |
| 243 | } |
| 244 | tva.SetCursorTarget(lexer.Pos{Ln: df.I1}) |
| 245 | return true |
| 246 | } |
| 247 | |
| 248 | // prevDiff moves to previous diff region |
| 249 | func (dv *DiffEditor) prevDiff(ab int) bool { |
no test coverage detected