Skip to content

Commit

Permalink
allow for negative (automatic) row names in data viewer; fixes #1784
Browse files Browse the repository at this point in the history
addresses a regression from commit:

e2b9ba1

which causes row numbers to be negative in the data viewer when row
names are auto-generated numbers.
  • Loading branch information
jmcphers committed Nov 27, 2017
1 parent 1b5767d commit a398726
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cpp/session/modules/SessionDataViewer.R
Expand Up @@ -185,7 +185,9 @@
info <- .row_names_info(x, type = 0L)
if (is.integer(info) && is.na(info[[1]]))
{
n <- info[[2]]
# the second element indicates the number of rows, and is negative if they're
# automatic
n <- abs(info[[2]])
range <- seq(from = start, to = min(n, start + len))
return(as.character(range))
}
Expand Down

0 comments on commit a398726

Please sign in to comment.