Removed File_Edit_Positions.last_set_type since it was always set but never read
This commit is contained in:
parent
24f7f66a24
commit
46a0466ff4
|
@ -19,13 +19,11 @@ string_from_file_name(Editing_File_Name *name){
|
|||
internal void
|
||||
file_edit_positions_set_cursor(File_Edit_Positions *edit_pos, i64 pos){
|
||||
edit_pos->cursor_pos = pos;
|
||||
edit_pos->last_set_type = EditPos_CursorSet;
|
||||
}
|
||||
|
||||
internal void
|
||||
file_edit_positions_set_scroll(File_Edit_Positions *edit_pos, Buffer_Scroll scroll){
|
||||
edit_pos->scroll = scroll;
|
||||
edit_pos->last_set_type = EditPos_ScrollSet;
|
||||
}
|
||||
|
||||
internal void
|
||||
|
|
|
@ -12,14 +12,7 @@
|
|||
#if !defined(FRED_FILE_H)
|
||||
#define FRED_FILE_H
|
||||
|
||||
typedef i32 Edit_Pos_Set_Type;
|
||||
enum{
|
||||
EditPos_None,
|
||||
EditPos_CursorSet,
|
||||
EditPos_ScrollSet
|
||||
};
|
||||
struct File_Edit_Positions{
|
||||
Edit_Pos_Set_Type last_set_type;
|
||||
Buffer_Scroll scroll;
|
||||
i64 cursor_pos;
|
||||
};
|
||||
|
|
|
@ -450,7 +450,6 @@ view_set_cursor_and_scroll(Thread_Context *tctx, Models *models, View *view, i64
|
|||
Vec2_f32 p = view_relative_xy_of_pos(tctx, models, view, cursor.line, pos);
|
||||
view->preferred_x = p.x;
|
||||
file_edit_positions_set_scroll(&edit_pos, scroll);
|
||||
edit_pos.last_set_type = EditPos_None;
|
||||
view_set_edit_pos(view, edit_pos);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue