Browse Subversion Repository
Diff of /window.rb
Parent Directory
| Revision Log
| Patch
| 165 |
refresh_cursor |
refresh_cursor |
| 166 |
end |
end |
| 167 |
|
|
| 168 |
|
#Move the cursor to the next line. |
| 169 |
|
# |
| 170 |
|
#=== Warning |
| 171 |
|
#This method *MUST* *NOT* be overrided in derived classes. |
| 172 |
|
def cursor_goto_next_line |
| 173 |
|
if @cursor.row == (@buffer.lines.size - 1) |
| 174 |
|
#ToDo: Alert that the cursor is in the last line. |
| 175 |
|
@view.beep |
| 176 |
|
else |
| 177 |
|
@cursor.row += 1 |
| 178 |
|
if @buffer.lines[@cursor.row].size < @cursor.column |
| 179 |
|
@cursor.column = @buffer.lines[@cursor.row].size |
| 180 |
|
end |
| 181 |
|
end |
| 182 |
|
|
| 183 |
|
refresh_cursor |
| 184 |
|
end |
| 185 |
|
|
| 186 |
|
#Move the cursor to the previous line. |
| 187 |
|
# |
| 188 |
|
#=== Warning |
| 189 |
|
#This method *MUST* *NOT* be overrided in derived classes. |
| 190 |
|
def cursor_goto_previous_line |
| 191 |
|
if @cursor.row == 0 |
| 192 |
|
#ToDo: Alert that the cursor is in the previous line. |
| 193 |
|
@view.beep |
| 194 |
|
else |
| 195 |
|
@cursor.row -= 1 |
| 196 |
|
if @buffer.lines[@cursor.row].size < @cursor.column |
| 197 |
|
@cursor.column = @buffer.lines[@cursor.row].size |
| 198 |
|
end |
| 199 |
|
end |
| 200 |
|
|
| 201 |
|
refresh_cursor |
| 202 |
|
end |
| 203 |
|
|
| 204 |
#Redraw the cursor. |
#Redraw the cursor. |
| 205 |
# |
# |
| 206 |
#=== Warning |
#=== Warning |
|
|
Legend:
| Removed from v.18 |
|
| changed lines |
| |
Added in v.19 |
|
|
|