AdjustPosIfAfterTime checks the time stamp and IfAfterTime, it adjusts the given text position as a function of the edit del determines what to do with positions within a deleted region either move to start or end of the region, or return an error.
(pos lexer.Pos, t time.Time, del AdjustPosDel)
| 150 | // del determines what to do with positions within a deleted region |
| 151 | // either move to start or end of the region, or return an error. |
| 152 | func (te *Edit) AdjustPosIfAfterTime(pos lexer.Pos, t time.Time, del AdjustPosDel) lexer.Pos { |
| 153 | if te == nil { |
| 154 | return pos |
| 155 | } |
| 156 | if te.Reg.IsAfterTime(t) { |
| 157 | return te.AdjustPos(pos, del) |
| 158 | } |
| 159 | return pos |
| 160 | } |
| 161 | |
| 162 | // AdjustReg adjusts the given text region as a function of the edit, including |
| 163 | // checking that the timestamp on the region is after the edit time, if |
nothing calls this directly
no test coverage detected