Skip to content

Commit

Permalink
Fix cursor position bug
Browse files Browse the repository at this point in the history
  • Loading branch information
akiyosi committed Jun 2, 2019
1 parent 4101604 commit 0df8f9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions editor/cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ func (c *Cursor) updateCursorShape() {

func (c *Cursor) update() {
c.updateCursorShape()
if c.ws.palette.widget.IsVisible() {
return
}
row := c.ws.screen.cursor[0]
col := c.ws.screen.cursor[1]
x := int(float64(col) * c.ws.font.truewidth)
Expand Down
3 changes: 0 additions & 3 deletions editor/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ func (m *Message) resize() {

var x, y int
var ok bool

if !m.isExpand {
m.width = m.ws.screen.widget.Width() / 3
ok = m.resizeMessages()
Expand Down Expand Up @@ -316,8 +315,6 @@ func (m *Message) msgShow(args []interface{}) {
if len(arg.([]interface{})) > 2 {
replaceLast, ok = arg.([]interface{})[2].(bool)
}
fmt.Println(length)

if kind == prevKind {
// Do not show message icon if the same kind as the previous kind
m.makeMessage("_dup", attrId, buffer.String(), length, replaceLast)
Expand Down

0 comments on commit 0df8f9d

Please sign in to comment.